\n\t\t\n\t\t$valida = $this->validaCalendario();\n\t\t\n\t\tif(!$valida){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->proyecto=$proyecto;\n $datosProyecto=$this->consultarTipoProyecto();\n $this->tipoProyecto=$datosProyecto[0]['TIPO'];\n $this->nivelProyecto=$datosProyecto[0]['NIVEL'];\n\t\t$this->anio=$anio;\n\t\t$this->periodo=$periodo;\n //Si el proyecto es un posgrado no aplica reglamento\n if (trim($this->nivelProyecto)!='PREGRADO')\n {\n //inserta el evento de inicio\n $this->insertarInicioEvento(73,$this->tipoProyecto);\n //actualiza la fecha de fin del evento\n $this->insertarFinEvento(73);\n //vuelve al formulario de cierre\n $this->volverFormularioCierre();\n exit;\n }\n\t\t$this->insertarInicioEvento(73,$this->tipoProyecto);\n\t\t//consulta los estudiantes que se encuentran registrados en la tabla de reglamento del proyecto\n \t$estudiantes=$this->consultarEstudiantesReglamento();\n\t\t//consulta todos los estudiantes en prueba para periodos anteriores\n\t\t$estudiantesPrueba=$this->consultarEstudiantesPrueba();\n //crea un arreglo de estudiantes que han estado en prueba indicando el motivo\n\t\t$this->estudiantesPrueba=$this->organizarEstudiantesPrueba($estudiantesPrueba);\n //consulta las notas perdidas de los estudiantes en la tabla de reglamento\n $this->notasPerdidas=$this->consultarNotasPerdidas();\n\t\t//Genera arreglo de notas perdidas organizado por estudiante, espacio, ano y periodo\n if (is_array($this->notasPerdidas)&&!empty($this->notasPerdidas))\n {\n $this->organizarNotasPorEstudiante();\n }\n\t\t//ejecuta proceso por cada estudiante\n $a=0;\n\t\tif(!is_array($estudiantes))\n {\n $this->error[]=\"No hay estudiantes para procesar\";\n //return false;\t\t\t\n\t\t}else\n {\n $numRegistros=count($estudiantes);\n\t\t\tforeach($estudiantes as $clave=>$valor)\n {\n\n $porcentaje = $a * 100 / $numRegistros; //saco mi valor en porcentaje\n echo \"\"; //llamo a la función JS(JavaScript) para actualizar el progreso\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\n ob_flush();\n $a++;\n usleep (300); \n $this->procesarEstudiante($valor);\n\t\t\t}\t\n }\n\t\t//actualiza la fecha de fin del evento\n\t\t$this->insertarFinEvento(73);\n //vuelve al formulario de cierre\n $this->volverFormularioCierre();\n\n\t\treturn true;\n\t}","title":""},{"docid":"8450280bee9ac75fd7aec306f4297f46","score":"0.5441922","text":"function cl_constrescr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"constrescr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }","title":""},{"docid":"c6aeffe433faa1826f8a0066037b079d","score":"0.5437066","text":"function crearComercio($p){\n // creo comercio\n $c = R::dispense(\"comercios\");\n $c[\"cuit\"] = $p[\"cuit\"];\n $c[\"razon_social\"] = $p[\"razon_social\"];\n $c[\"nombre\"] = $p[\"nombre\"];\n $c[\"dni_titular\"] = $p[\"dni_titular\"];\n $c[\"nombre_titular\"] = $p[\"nombre_titular\"];\n $c[\"mail\"] = $p[\"mail\"];\n $c[\"telefono_fijo\"] = $p[\"telefono_fijo\"];\n $c[\"telefono_celular\"] = $p[\"telefono_celular\"];\n // [comercio]\n $c[\"domicilio_comercio_calle\"] = $p[\"domicilio_comercio_calle\"];\n $c[\"domicilio_comercio_altura\"] = $p[\"domicilio_comercio_altura\"];\n $c[\"domicilio_comercio_observacion\"] = $p[\"domicilio_comercio_observacion\"];\n $c[\"domicilio_comercio_cpa\"] = $p[\"domicilio_comercio_cpa\"];\n $c[\"domicilio_comercio_provincia\"] = $p[\"domicilio_comercio_provincia\"];\n $c[\"domicilio_comercio_localidad\"] = $p[\"domicilio_comercio_localidad\"];\n // [legal]\n $c[\"domicilio_legal_calle\"] = $p[\"domicilio_legal_calle\"];\n $c[\"domicilio_legal_altura\"] = $p[\"domicilio_legal_altura\"];\n $c[\"domicilio_legal_observacion\"] = $p[\"domicilio_legal_observacion\"];\n $c[\"domicilio_legal_cpa\"] = $p[\"domicilio_legal_cpa\"];\n $c[\"domicilio_legal_provincia\"] = $p[\"domicilio_legal_provincia\"];\n $c[\"domicilio_legal_localidad\"] = $p[\"domicilio_legal_localidad\"];\n // [real]\n $c[\"domicilio_real_calle\"] = $p[\"domicilio_real_calle\"];\n $c[\"domicilio_real_altura\"] = $p[\"domicilio_real_altura\"];\n $c[\"domicilio_real_observacion\"] = $p[\"domicilio_real_observacion\"];\n $c[\"domicilio_real_cpa\"] = $p[\"domicilio_real_cpa\"];\n $c[\"domicilio_real_provincia\"] = $p[\"domicilio_real_provincia\"];\n $c[\"domicilio_real_localidad\"] = $p[\"domicilio_real_localidad\"];\n // [/domicilio]\n $c[\"observacion\"] = $p[\"observacion\"];\n $c[\"rubro\"] = $p[\"rubro\"];\n $c[\"convenio\"] = $p[\"convenio\"];\n $c[\"fecha_alta\"] = date(\"Ymd\");\n $c[\"estado\"] = true;\n $id_comercio = R::store($c);\n // creo usuario\n $u = R::dispense(\"user\");\n $u[\"user\"] = $p[\"user\"];\n $u[\"pass\"] = md5($p[\"pass\"]);\n $u[\"level\"] = 3; // ESTO DEBERIA ESTAR EN LA BD, QUIENES SON COMERCIO; y FINANCIERA\n $u[\"titular\"] = $p[\"nombre_titular\"];\n $u[\"dni\"] = $p[\"dni_titular\"];\n $u[\"id_comercio\"] = $id_comercio;\n R::store($u);\n response(200,\"comercio creado exitosamente\",[\"exito\" => true, \"id\" => $id_comercio, \"ret\" => $p]);\n}","title":""},{"docid":"c4cc93e428a6a2b21d3b7bf4aa4aca55","score":"0.54362017","text":"function cl_arrepaga() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"arrepaga\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }","title":""},{"docid":"682d2e85081083b10a5485407598d3a9","score":"0.54327935","text":"function __construct(\n $codUsrMod,\n $p_apellido,\n $s_apellido = 'default',\n $p_nombre,\n $s_nombre = 'default',\n $nacionalidad,\n $cedula,\n $telefono = 'default',\n $telefonoOtro = 'default',\n $fecNac = 'default',\n $lugNac = 'default',\n $email = 'default',\n $sexo,\n $relacion,\n $viveConAlumno,\n $nivelInstruccion,\n $profesion = 'default',\n $telefonoTrabajo = 'default',\n $direccionTrabajo = 'default',\n $lugarTrabajo = 'default'\n ){\n $conexion = conexion();//desde master.php > conexion.php\n $this->codUsrMod = mysqli_escape_string($conexion, trim($codUsrMod));\n $this->p_apellido = mysqli_escape_string($conexion, trim($p_apellido));\n $this->s_apellido = mysqli_escape_string($conexion, trim($s_apellido));\n $this->p_nombre = mysqli_escape_string($conexion, trim($p_nombre));\n $this->s_nombre = mysqli_escape_string($conexion, trim($s_nombre));\n $this->nacionalidad = mysqli_escape_string($conexion, trim($nacionalidad));\n $this->cedula = mysqli_escape_string($conexion, trim($cedula));\n $this->telefono = mysqli_escape_string($conexion, trim($telefono));\n $this->telefonoOtro = mysqli_escape_string($conexion, trim($telefonoOtro));\n $this->fecNac = mysqli_escape_string($conexion, trim($fecNac));\n $this->lugNac = mysqli_escape_string($conexion, trim($lugNac));\n $this->email = mysqli_escape_string($conexion, trim($email));\n $this->sexo = mysqli_escape_string($conexion, trim($sexo));\n $this->relacion = mysqli_escape_string($conexion, trim($relacion));\n $this->viveConAlumno = mysqli_escape_string($conexion, trim($viveConAlumno));\n $this->nivelInstruccion = mysqli_escape_string($conexion, trim($nivelInstruccion));\n $this->profesion = mysqli_escape_string($conexion, trim($profesion));\n $this->telefonoTrabajo = mysqli_escape_string($conexion, trim($telefonoTrabajo));\n $this->direccionTrabajo = mysqli_escape_string($conexion, trim($direccionTrabajo));\n $this->lugarTrabajo = mysqli_escape_string($conexion, trim($lugarTrabajo));\n //metodos internos:\n self::setNull();\n self::chequeaForma();\n self::chequeame();\n }","title":""},{"docid":"cf73e3d4a58194cf1e942b9a63e8a8a6","score":"0.5425714","text":"function cl_especmedico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"especmedico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }","title":""},{"docid":"66fe7caf7bc7b316c20aacfeb71ea1d6","score":"0.54213274","text":"public function cargarPromociones(){\n\t\t$promociones = new promocion();\n\t\t$promociones->search_clause = '1';\n\t\t$this->promociones = $promociones->read('id,nombre,imagen,fecha_limite');\n\t}","title":""},{"docid":"7d9731ec653a5cc8c7d821efcebf5e97","score":"0.5420778","text":"function genera_correlativo($Codigo_Cliente)\r\n\t{\r\n\t\t\r\n\t\t$Condicion = 'and codigo_cliente = \"'.$Codigo_Cliente.'\"';\r\n\t\tif('cli' == $this->session->userdata('tipo_grupo'))\r\n\t\t{\r\n\t\t\t$Condicion = '';\r\n\t\t}\r\n\t\t\r\n\t\t//Se genera la consulta.\r\n\t\t$Consulta = '\r\n\t\t\tSELECT proceso\r\n\t\t\tFROM procesos proc, cliente clie\r\n\t\t\tWHERE proc.id_cliente = clie.id_cliente\r\n\t\t\t'.$Condicion.'\r\n\t\t\tand id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\torder by proceso+0 desc limit 0, 1\r\n\t\t';\r\n\t\t\r\n\t\t//Ejecuto la consulta\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\r\n\t\t//Verificamos si se encontraron numeros de procesos anteriores.\r\n\t\tif($Resultado->num_rows() > 0)\r\n\t\t{\r\n\t\t\t$Proceso = $Resultado->row_array();\r\n\t\t\techo $Proceso['proceso'] + 1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo \"1\";\r\n\t\t}\r\n\t}","title":""},{"docid":"aa2d0b2ce846fccfd946d056342650a3","score":"0.5412534","text":"function cl_liclicitaevento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"liclicitaevento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }","title":""},{"docid":"6788488adfa52aa9afa2c190a88a9738","score":"0.5411518","text":"function Cargar_precios($id, $acuerdo, $filadesde, $buscar_temporada, $buscar_habitacion, $buscar_caracteristica){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\t\t\t\r\n\t\tif($buscar_temporada != null){\r\n\t\t\t$habit = \" AND HABITACION = '\".$buscar_habitacion.\"'\";\r\n\t\t\t$carac = \" AND CARACTERISTICA = '\".$buscar_caracteristica.\"'\";\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND ACUERDO = \".$acuerdo.\" AND TEMPORADA = '\".$buscar_temporada.\"'\";\r\n\t\t\tif($buscar_habitacion != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $habit;\t\r\n\t\t\t}\r\n\t\t\tif($buscar_caracteristica != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $carac;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_habitacion){\r\n\t\t\t$carac = \" AND CARACTERISTICA = '\".$buscar_caracteristica.\"'\";\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND ACUERDO = \".$acuerdo.\" AND HABITACION = '\".$buscar_habitacion.\"'\";\r\n\t\t\tif($buscar_caracteristica != null){\r\n\t\t\t\t\t$CADENA_BUSCAR .= $carac;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_caracteristica){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND ACUERDO = \".$acuerdo.\" AND CARACTERISTICA = '\".$buscar_caracteristica.\"'\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND ACUERDO = '\".$acuerdo.\"'\"; \r\n \t\t}\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT temporada temporada_prec, habitacion, caracteristica, uso, coste_pax, coste_habitacion, calculo, porcentaje_neto, neto_pax, neto_habitacion, porcentaje_com, pvp_pax, pvp_habitacion FROM hit_alojamientos_precios \".$CADENA_BUSCAR.\" ORDER BY temporada, uso\");\r\n\r\n\t\tif ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'ALOJAMIENTOS_PRECIOS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$precios = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['temporada_prec'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($precios,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $precios;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}","title":""},{"docid":"c671244e0f7de9d642ef6b221231efae","score":"0.54110897","text":"function cl_empagemovformapagamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemovformapagamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }","title":""},{"docid":"439267ab4b675a0574f324a99d532fc0","score":"0.5410127","text":"function __construct(){\n\t\t$this->anio = date(\"Y\");\n if($_SESSION[\"pensum\"] == \"\") {\n require_once(\"ClsPensum.php\");\n $ClsPen = new ClsPensum();\n $this->pensum = $ClsPen->get_pensum_activo();\n }else{\n $this->pensum = $_SESSION[\"pensum\"];\n }\n\t}","title":""},{"docid":"824ae06a078c30c5a6d8a298441eb5f2","score":"0.5410074","text":"public function Opciones() {\n \n }","title":""},{"docid":"16dfc10dc59c06b5e77b94a35e1a26ef","score":"0.5409521","text":"public function crearFinca()\n {\n $this->validarSesion();\n $this->vista(\"crearfinca/crearfinca\");\n }","title":""},{"docid":"46300bb2f3f5588d355d0066c4401192","score":"0.54076815","text":"public function initPioche(){\n $this->pioche = $this->getDeck()->getCartes();\n }","title":""},{"docid":"256bef1ba0d79aced6e989a63d0e1e7b","score":"0.5404904","text":"function reporteCabeceraProcesoCaja(){\n\t\t$this->procedimiento='tes.ft_proceso_caja_sel';\n\t\t$this->transaccion='TES_REPCCAJA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\t\t$this->captura('id_cuenta_doc','INTEGER');\n\t\t$this->captura('id_tipo_cuenta_doc','INTEGER');\n\t\t$this->captura('id_proceso_wf','INTEGER');\n\t\t$this->captura('id_caja','INTEGER');\n\t\t$this->captura('nombre_cheque','VARCHAR');\n\t\t$this->captura('id_uo','INTEGER');\n\t\t$this->captura('id_funcionario','INTEGER');\n\t\t$this->captura('tipo_pago','VARCHAR');\n\t\t$this->captura('id_depto','INTEGER');\n\t\t$this->captura('id_cuenta_doc_fk','INTEGER');\n\t\t$this->captura('nro_tramite','VARCHAR');\n\t\t$this->captura('motivo','VARCHAR');\n\t\t$this->captura('fecha','DATE');\n\t\t$this->captura('id_moneda','INTEGER');\n\t\t$this->captura('estado','VARCHAR');\n\t\t$this->captura('estado_reg','VARCHAR');\n\t\t$this->captura('id_estado_wf','INTEGER');\n\t\t$this->captura('id_usuario_ai','INTEGER');\n\t\t$this->captura('usuario_ai','VARCHAR');\n\t\t$this->captura('fecha_reg','TIMESTAMP');\n\t\t$this->captura('id_usuario_reg','INTEGER');\n\t\t$this->captura('fecha_mod','TIMESTAMP');\n\t\t$this->captura('id_usuario_mod','INTEGER');\n\t\t$this->captura('usr_reg','VARCHAR');\n\t\t$this->captura('usr_mod','VARCHAR');\n\t\t$this->captura('desc_moneda','VARCHAR');\n\t\t$this->captura('desc_depto','VARCHAR');\n\t\t$this->captura('obs','TEXT');\n\t\t$this->captura('desc_funcionario','TEXT');\n\t\t$this->captura('importe','numeric');\n\t\t$this->captura('desc_funcionario_cuenta_bancaria','varchar');\n\t\t$this->captura('id_funcionario_cuenta_bancaria','integer');\n\t\t$this->captura('id_depto_lb','integer');\n\t\t$this->captura('id_depto_conta','integer');\n\t\t$this->captura('desc_tipo_cuenta_doc','VARCHAR');\n\t\t$this->captura('sw_solicitud','VARCHAR');\n\t\t$this->captura('lugar','VARCHAR');\n\t\t$this->captura('cargo_funcionario','varchar');\n\t\t$this->captura('nombre_unidad','VARCHAR');\n\t\t$this->captura('importe_literal','VARCHAR');\n\t\t$this->captura('motivo_ori','VARCHAR');\n\t\t$this->captura('gerente_financiero','VARCHAR');\n\t\t$this->captura('cargo_gerente_financiero','VARCHAR');\n\n\t\t$this->captura('aprobador','TEXT');\n\t\t$this->captura('cargo_aprobador','TEXT');\n\n\t\t$this->captura('nro_cbte','VARCHAR');\n\t\t$this->captura('num_memo','VARCHAR');\n\t\t$this->captura('num_rendicion','VARCHAR');\n\t\t$this->captura('nro_cheque','integer');\n\t\t$this->captura('importe_solicitado','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}","title":""}],"string":"[\n {\n \"docid\": \"a82a903f23376012762cb12382e2b1e5\",\n \"score\": \"0.7135835\",\n \"text\": \"function iniciar_contexto_proyecto_cargado()\\r\\n\\t{\\r\\n\\t\\tif(!self::acceso_recursivo()){\\r\\n\\t\\t\\tself::incluir_path_proyecto_cargado();\\r\\n\\t\\t\\t$info = toba::proyecto()->cargar_info_basica(self::get_proyecto_cargado());\\r\\n\\t\\t\\tif($info['contexto_ejecucion_subclase_archivo']&&$info['contexto_ejecucion_subclase_archivo']) {\\r\\n\\t\\t\\t\\trequire_once($info['contexto_ejecucion_subclase_archivo']);\\r\\n\\t\\t\\t\\t$contexto = new $info['contexto_ejecucion_subclase']();\\r\\n\\t\\t\\t\\t$contexto->conf__inicial();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d14cc7136f931211a602f2fa3ffffbc\",\n \"score\": \"0.6173627\",\n \"text\": \"function cl_cadtipoparcdeb() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"cadtipoparcdeb\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a24b12c70f91602c6cae74ad67941d36\",\n \"score\": \"0.60206276\",\n \"text\": \"protected function inicializar(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d976acf0caf6d403abed2703ca909b44\",\n \"score\": \"0.5992426\",\n \"text\": \"function cl_procvalores() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"procvalores\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0eb62e833c2bfb8fd6d833b398f33f4\",\n \"score\": \"0.5976156\",\n \"text\": \"static public function ctrCrearPoliticaProcedimiento(){\\n\\t\\tif(isset($_POST[\\\"accionPoliticaProcedimiento\\\"]) && $_POST[\\\"accionPoliticaProcedimiento\\\"] == \\\"crear\\\"){\\n\\t\\t\\t$fecha = date('Y-m-d');\\n\\t\\t\\t$hora = date('H:i:s');\\n\\t\\t\\t$fechaActual = $fecha.' '.$hora;\\t\\t\\t\\n\\t\\t\\t$tabla1 = 'vtaca_politica_procedimiento';\\n\\t\\t\\t$tabla2 = 'vtade_politica_procedimiento';\\n\\t\\t\\t$codPoliticaProcedimiento = maximoCodigoTabla($tabla1,'cod_politica','');\\n\\t\\t\\t$datos = array(\\\"cod_politica\\\" => $codPoliticaProcedimiento,\\n\\t\\t\\t\\t\\t\\t \\\"dsc_politica\\\" => ms_escape_string(trim($_POST[\\\"nombrePoliticaProcedimiento\\\"])),\\n\\t\\t\\t\\t\\t\\t \\\"cod_usr_registro\\\" => $_SESSION[\\\"cod_trabajador\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"fch_registro\\\" => $fechaActual);\\n\\t\\t\\t$rutaGlobal = realpath(dirname(__FILE__));\\n\\t\\t\\t$rutaGlobal = rutaGlobal($rutaGlobal);\\n\\t\\t\\t$arrayArchivo = [];\\n\\t\\t\\t$arrayNombreArchivo = [];\\n\\t\\t\\t$numLineaArchivo = [];\\n\\t\\t\\t$arrayUsrRegistro = [];\\n\\t\\t\\t$arrayFchRegistro = [];\\n\\t\\t\\t$item = \\\"dsc_politica\\\";\\n\\t\\t\\t$valor = ms_escape_string(trim($_POST[\\\"nombrePoliticaProcedimiento\\\"]));\\n\\t\\t\\t$entrada = \\\"validarNombreRepetido\\\";\\n\\t\\t\\t$nombre = ModeloPoliticaProcedimiento::mdlMostrarPoliticaProcedimiento($tabla1,$item,$valor,$entrada);\\n\\t\\t\\tif($nombre['contador'] == 0){\\n\\t\\t\\t\\tif($_FILES[\\\"archivoPoliticaProcedimiento\\\"][\\\"tmp_name\\\"][0] != ''){\\n\\t\\t\\t\\t\\tfor ($i=0; $i < count($_FILES[\\\"archivoPoliticaProcedimiento\\\"][\\\"tmp_name\\\"]) ; $i++) {\\n\\t\\t\\t\\t\\t\\t$fileArchivo = $_FILES[\\\"archivoPoliticaProcedimiento\\\"];\\n\\t\\t\\t\\t\\t\\t$nombreRutaArchivo = $codPoliticaProcedimiento.\\\"-\\\".($i+1).\\\"-\\\".ms_escape_string(trim($fileArchivo[\\\"name\\\"][$i]));\\n\\t\\t\\t\\t\\t\\tarray_push($arrayArchivo,$nombreRutaArchivo);\\n\\t\\t\\t\\t\\t\\tarray_push($arrayNombreArchivo,ms_escape_string(trim($fileArchivo[\\\"name\\\"][$i])));\\n\\t\\t\\t\\t\\t\\tarray_push($numLineaArchivo, $i+1);\\n\\t\\t\\t\\t\\t\\tarray_push($arrayUsrRegistro,$_SESSION[\\\"cod_trabajador\\\"]);\\n\\t\\t\\t\\t\\t\\tarray_push($arrayFchRegistro,$fechaActual);\\n\\t\\t\\t\\t\\t}//for\\t\\t\\t\\t\\n\\t\\t\\t\\t}//if\\n\\t\\t\\t\\t$respuesta = ModeloPoliticaProcedimiento::mdlIngresarPoliticaProcedimiento($tabla1,$tabla2,$datos,$numLineaArchivo,$arrayArchivo,$arrayNombreArchivo,$arrayUsrRegistro,$arrayFchRegistro,$codPoliticaProcedimiento);\\n\\t\\t\\t\\tif($respuesta == \\\"ok\\\"){\\n\\t\\t\\t\\t\\tif($_FILES[\\\"archivoPoliticaProcedimiento\\\"][\\\"tmp_name\\\"][0] != ''){\\n\\t\\t\\t\\t\\t\\tfor ($i=0; $i < count($_FILES[\\\"archivoPoliticaProcedimiento\\\"][\\\"tmp_name\\\"]) ; $i++) {\\n\\t\\t\\t\\t\\t\\t\\t$nombreRutaArchivo = $codPoliticaProcedimiento.\\\"-\\\".($i+1).\\\"-\\\".trim(utf8_decode($fileArchivo[\\\"name\\\"][$i]));\\n\\t\\t\\t\\t\\t\\t\\t$ruta = $rutaGlobal.\\\"/archivos/politica-procedimiento/\\\".$nombreRutaArchivo;\\n\\t\\t\\t\\t\\t\\t\\tmove_uploaded_file($fileArchivo[\\\"tmp_name\\\"][$i], $ruta);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$respuesta = \\\"nombreRepetido\\\";\\n\\t\\t\\t}\\n\\t\\t\\treturn $respuesta;\\n\\t\\t}//if\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1cb34a134bd6383b47364d39f9cca17e\",\n \"score\": \"0.597103\",\n \"text\": \"function cl_requisicaoaidof() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"requisicaoaidof\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4014ee71d9a5e1a526cb88fb558b8a7f\",\n \"score\": \"0.5964286\",\n \"text\": \"function cl_procandamint() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"procandamint\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6db5969960d415906a3363038a9c3bc4\",\n \"score\": \"0.59555167\",\n \"text\": \"protected function generar_cc_inicio_nivel()\\n\\t{\\n\\t\\t$metodo = $this->_tipo_salida . '_cc_inicio_nivel';\\n\\t\\tif (isset($this->_salida)) {\\n\\t\\t\\t$this->_salida->$metodo();\\n\\t\\t} else {\\n\\t\\t\\t$this->$metodo();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e610812adda9086533a5bc36d8e1760f\",\n \"score\": \"0.5948393\",\n \"text\": \"function cl_proginterrompe() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"proginterrompe\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8460b6fde8339296751a0651b0cd8a6a\",\n \"score\": \"0.5947814\",\n \"text\": \"static public function ctrCrearCotizador(){\\n\\n\\t\\tif(isset($_POST[\\\"dni_cliente\\\"])){\\n\\n\\t\\t\\t\\t/*=============================================\\n\\t\\t\\t\\tvariables para agregar cotizaciones\\n\\t\\t\\t\\t=============================================*/\\n\\n\\t\\t\\t\\t$datos = array(\\\"dni\\\" => $_POST[\\\"dni_cliente\\\"],\\n \\\"cot_sep_usd\\\" => $_POST[\\\"cot_sep_usd\\\"],\\n \\\"cot_cis_usd\\\" => $_POST[\\\"cot_cis_usd\\\"],\\n \\\"cot_sci_usd\\\" => $_POST[\\\"cot_sci_usd\\\"],\\n \\\"cot_tci\\\" => $_POST[\\\"cot_tci\\\"],\\n \\\"cot_pfd\\\" => $_POST[\\\"cot_pfd\\\"],\\n \\\"cot_mfd\\\" => $_POST[\\\"cot_mfd\\\"],\\n \\\"cot_tci_usd\\\" => $_POST[\\\"cot_tci_usd\\\"],\\n\\t\\t\\t\\t\\t \\t \\\"id_proyecto\\\" => $_POST[\\\"id_proyecto\\\"],\\n \\\"tipo_cambio\\\" => $_POST[\\\"tipo_cambio\\\"],\\n \\\"asesor\\\" => $_SESSION[\\\"nombre\\\"],\\n \\\"asesor_nombre\\\" => $_SESSION[\\\"nombre\\\"],\\n \\\"asesor_telefono\\\" => $_SESSION[\\\"telefono\\\"]);\\n\\n\\t\\t\\t\\t$tabla = \\\"cotizacion\\\";\\n\\n\\t\\t\\t\\t$respuesta = ModeloCotizador::mdlIngresarCotizador($tabla, $datos);\\n\\n\\t\\t\\t\\tif($respuesta == \\\"ok\\\"){\\n\\n\\t\\t\\t\\t\\techo'';\\n\\n\\t\\t\\t\\t}\\t\\t\\t\\n\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"569f18cb30353c7fe39b58c8bd2f9a00\",\n \"score\": \"0.59330523\",\n \"text\": \"function cl_ciclosensino() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"ciclosensino\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d6889c7f0e5199dae54c5ec818878a0\",\n \"score\": \"0.59292424\",\n \"text\": \"function cl_processoforopartilha() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"processoforopartilha\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4add9e16b9d9709b911782d7e618e61\",\n \"score\": \"0.59256583\",\n \"text\": \"function cl_inicial() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"inicial\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a6a44deae8c86442b0b93e6f2f67061\",\n \"score\": \"0.5922954\",\n \"text\": \"private function cargar() {\\n $this->omision();\\n $res = Funciones::gEjecutarSQL(\\\"SELECT PR.CODAPAR,CONCAT(A.PORTAL,'-',A.PISO,A.LETRA) AS APARTAMENTO,PR.CODPERS,CONCAT(P.APELLIDOS,' ',P.NOMBRE) AS PERSONA,PR.BAJA,DATE_FORMAT(PR.BAJA,'%d-%m-%Y') AS FECHA,PR.ORDEN FROM PROPIETARIOS PR LEFT JOIN APARTAMENTOS A ON PR.CODAPAR=A.CODAPAR LEFT JOIN PERSONAS P ON PR.CODPERS=P.CODPERS ORDER BY CODAPAR ASC,IFNULL(BAJA,'9999-99-99') DESC, ORDEN ASC\\\");\\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\\n $this->aPropietarios[] = array($aRow['CODAPAR'],$aRow['APARTAMENTO'],$aRow['CODPERS'],$aRow['PERSONA'],$aRow['BAJA'],$aRow['FECHA'],$aRow['ORDEN']);\\n }\\n $res->closeCursor();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f08d0a7103f846ad4b08c56ac812efdc\",\n \"score\": \"0.59209216\",\n \"text\": \"function generapedido_consumo($cod = '', $error = ''){\\n \\t \\n \\t$data['id_pedido'] = $cod;\\n \\t$data['error'] = $error;\\n \\t$data['tipo'] = $this->pedidos_model->consulta_tipo($cod);\\n \\tif ($data['tipo'] == \\\"P\\\")\\n \\t{$data['proveedores'] = $this->proveedores_model->obtener_proveedores();\\t\\n \\t}\\n \\t//$data['detalle_pedido'] = $this->detalle_pedido_model->consulta_detallepedido($cod);\\n\\n\\t\\t\\t\\t\\n\\t\\t \\t \\t\\t//css y js de la vista a cargar\\n \\t$data['js_files']=array('subvariable1'=> base_url().'assets/datepicker/js/jquery-1.7.2.min.js','subariable2'=>base_url().'assets/datepicker/js/jquery-ui-1.8.20.custom.min.js');\\n\\n\\t\\t$data['css_files']=array('subariable2'=>base_url().'assets/datepicker/css/ui-lightness/jquery-ui-1.8.20.custom.css', 'subariable3'=>base_url().'assets/css/rangos_fechas.css');\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t//cargo vista para realizar recepciones\\n $data['content_view']='detalle_pedido/rango_consumo.php';\\n \\t //template diferente para vistas que no incluyen grocery \\n \\t $this->load->view('template2',$data);\\n \\n \\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76dec02cc9c15b1014558ba224cb1f3d\",\n \"score\": \"0.58689564\",\n \"text\": \"function cl_progconvocacaores() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"progconvocacaores\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8079a134ecccedeec3ac7756429e12e\",\n \"score\": \"0.584713\",\n \"text\": \"function __construct(\\n $codUsrMod,\\n $p_apellido,\\n $s_apellido = 'default',\\n $p_nombre,\\n $s_nombre = 'default',\\n $nacionalidad,\\n $cedula = 'default',\\n $cedulaEscolar,\\n $telefono = 'default',\\n $telefonoOtro = 'default',\\n $fecNac,\\n $lugNac = 'default',\\n $sexo,\\n $actaNumero,\\n $actaFolio,\\n $plantelProcedencia = 'default',\\n $repitiente,\\n $codCurso,\\n $altura = 'default',\\n $peso = 'default',\\n $camisa = 'default',\\n $pantalon = 'default',\\n $zapato = 'default',\\n $discapacidad,\\n $vacuna,\\n $partidaNac = 'default',\\n $constanciaSano = 'default',\\n $canaima = 'default',\\n $bicentenario = 'default',\\n $boleta = 'default',\\n $fotosR = 'default',\\n $fotoCedulaPA = 'default',\\n $fotoCedulaPR = 'default',\\n $comentarios = 'default',\\n $codRepresentante,\\n $codPersonaRetira = 'default'\\n ){\\n $conexion = conexion();//desde master.php > conexion.php\\n $this->codUsrMod = mysqli_escape_string($conexion, trim($codUsrMod));\\n $this->p_apellido = mysqli_escape_string($conexion, trim($p_apellido));\\n $this->s_apellido = mysqli_escape_string($conexion, trim($s_apellido));\\n $this->p_nombre = mysqli_escape_string($conexion, trim($p_nombre));\\n $this->s_nombre = mysqli_escape_string($conexion, trim($s_nombre));\\n $this->nacionalidad = mysqli_escape_string($conexion, trim($nacionalidad));\\n $this->cedula = mysqli_escape_string($conexion, trim($cedula));\\n $this->cedulaEscolar = mysqli_escape_string($conexion, trim($cedulaEscolar));\\n $this->telefono = mysqli_escape_string($conexion, trim($telefono));\\n $this->telefonoOtro = mysqli_escape_string($conexion, trim($telefonoOtro));\\n $this->fecNac = mysqli_escape_string($conexion, trim($fecNac));\\n $this->lugNac = mysqli_escape_string($conexion, trim($lugNac));\\n $this->sexo = mysqli_escape_string($conexion, trim($sexo));\\n $this->actaNumero = mysqli_escape_string($conexion, trim($actaNumero));\\n $this->actaFolio = mysqli_escape_string($conexion, trim($actaFolio));\\n $this->plantelProcedencia = mysqli_escape_string($conexion, trim($plantelProcedencia));\\n $this->repitiente = mysqli_escape_string($conexion, trim($repitiente));\\n $this->codCurso = mysqli_escape_string($conexion, trim($codCurso));\\n $this->altura = mysqli_escape_string($conexion, trim($altura));\\n $this->peso = mysqli_escape_string($conexion, trim($peso));\\n $this->camisa = mysqli_escape_string($conexion, trim($camisa));\\n $this->pantalon = mysqli_escape_string($conexion, trim($pantalon));\\n $this->zapato = mysqli_escape_string($conexion, trim($zapato));\\n $this->discapacidad = mysqli_escape_string($conexion, trim($discapacidad));\\n $this->vacuna = mysqli_escape_string($conexion, trim($vacuna));\\n $this->codRepresentante = mysqli_escape_string($conexion, trim($codRepresentante));\\n $this->codPersonaRetira = mysqli_escape_string($conexion, trim($codPersonaRetira));\\n $this->recaudos = array(\\n 'partidaNac' => mysqli_escape_string($conexion, trim($partidaNac)),\\n 'constanciaSano' => mysqli_escape_string($conexion, trim($constanciaSano)),\\n 'canaima' => mysqli_escape_string($conexion, trim($canaima)),\\n 'bicentenario' => mysqli_escape_string($conexion, trim($bicentenario)),\\n 'boleta' => mysqli_escape_string($conexion, trim($boleta)),\\n 'fotosR' => mysqli_escape_string($conexion, trim($fotosR)),\\n 'fotoCedulaPA' => mysqli_escape_string($conexion, trim($fotoCedulaPA)),\\n 'fotoCedulaPR' => mysqli_escape_string($conexion, trim($fotoCedulaPR)),\\n );\\n $this->comentarios = mysqli_escape_string($conexion, trim($comentarios));\\n //metodos internos:\\n //para poner variables nulas si es necesario:\\n self::setNull();\\n //chequeaomos la forma (el objeto como tal):\\n self::chequeaForma();\\n self::chequeame(); //heredado de ChequearGenerico\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"efd07b8819ab160096ed8dcc92943866\",\n \"score\": \"0.5827707\",\n \"text\": \"public function crearCodigoPaquete() // (funcion privada)\\n {\\n do {\\n $codigoRepetido = false;\\n $codigoPaquete = \\\"\\\";\\n $valoresAlfabeticos = [\\\"a\\\", \\\"b\\\", \\\"c\\\", \\\"d\\\", \\\"e\\\", \\\"f\\\", \\\"g\\\", \\\"h\\\", \\\"i\\\", \\\"j\\\", \\\"k\\\", \\\"l\\\", \\\"m\\\", \\\"n\\\", \\\"o\\\", \\\"p\\\", \\n \\\"q\\\", \\\"r\\\", \\\"s\\\", \\\"t\\\", \\\"u\\\", \\\"v\\\", \\\"w\\\", \\\"x\\\", \\\"y\\\", \\\"z\\\"];\\n $valoresNumericos = [\\\"0\\\", \\\"1\\\", \\\"2\\\", \\\"3\\\", \\\"4\\\", \\\"5\\\", \\\"6\\\", \\\"7\\\", \\\"8\\\", \\\"9\\\"];\\n\\n // CREAMOS EL CODIGO DEL PAQUETE\\n for ($i = 0; $i < 8; $i++)\\n {\\n $letraRandom = random_int(0, 25);\\n $numeroRandom = random_int(0, 9);\\n $codigoPaquete .= $valoresAlfabeticos[$letraRandom];\\n $codigoPaquete .= $valoresNumericos[$numeroRandom];\\n } \\n\\n $sentencia = \\\"SELECT codigo \\n FROM paquete \\n WHERE codigo = '$codigoPaquete'\\\";\\n\\n $this->conexionServidor();\\n $this->conexionBaseDatos();\\n // BUSCAMOS SI YA HAY UN CODIGO IGUAL AL CREADO\\n $resultado = $this->ejecutarSentencia($sentencia);\\n $this->cerrarConexion();\\n\\n // VERIFICAMOS QUE EL CODIGO SEA UNICO\\n if (mysqli_num_rows($resultado) >= 1) // SI NO LO ES\\n {\\n // REPETIMOS EL PROCEDIMIENTO\\n $codigoRepetido = true;\\n }\\n\\n } while ($codigoRepetido);\\n\\n // RETORNAOS EL CODIGO DEL PAQUETE\\n return $codigoPaquete;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9e7a6e3fd7029c4c16926794c2f4a66\",\n \"score\": \"0.5825228\",\n \"text\": \"public function creaconcurso() {\\n $this->tipousuario('D');\\n $this->view->data = $this->get_allDepartamentos('H');\\n if(isset($_POST['IDCON_']) && $_POST['CONTOKEN']==$this->tokengenerate($_POST['IDCON_']))\\n {\\n $datoConid=['CON_ID' => \\\"'\\\" . $_POST[\\\"IDCON_\\\"] . \\\"'\\\"];\\n $this->view->DATA = $this->model->get_concurso($_POST['IDCON_']);\\n $this->view->DATA += ['fasesConcurso' => $this->model->getall_faseconcurso($datoConid)]; \\n }else {\\n $numcon= $this->model->getallConcurso();\\n $numcon=$numcon['Concursos'];\\n $count=(count($numcon)+1);\\n //DRH-001-2016\\n $numero=str_pad($count, 3, \\\"0\\\", STR_PAD_LEFT);\\n $this->view->codicon='DRH-'.$numero.'-'.date('Y');\\n }\\n \\n $this->view->render($this, 'creaconcurso');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a56c662fae1c807e2bda46f3192764a4\",\n \"score\": \"0.58249706\",\n \"text\": \"function cxcycxp(){\\n\\t\\t$cargos = $this->ChequesModel->listaCargos($_REQUEST['idPrvCli'], $_REQUEST['cobrar_pagar'],$_REQUEST['mone']);\\n\\t\\t$facturas = $this->ChequesModel->listaFacturas($_REQUEST['idPrvCli'], $_REQUEST['cobrar_pagar'],$_REQUEST['mone']);\\n\\t\\trequire('views/documentos/appministra.php');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b5d0117759b1ab39c984809702c632c\",\n \"score\": \"0.58134246\",\n \"text\": \"function pdf_cabecera_corte_control(&$nodo )\\n\\t{\\n\\t\\t//Dedusco el metodo que tengo que utilizar para generar el contenido\\n\\t\\t$metodo = 'pdf_cabecera_cc_contenido';\\n\\t\\t$metodo_redeclarado = $metodo . '__' . $nodo['corte'];\\n\\t\\tif(method_exists($this, $metodo_redeclarado)){\\n\\t\\t\\t$metodo = $metodo_redeclarado;\\n\\t\\t}\\n\\t\\t$this->$metodo($nodo);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30b7a80921ef7a6c468ff0a8a98d5ba2\",\n \"score\": \"0.5811495\",\n \"text\": \"function cl_pontocom() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"pontocom\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30c2b6610634490ddfa93efd4521a85f\",\n \"score\": \"0.57875526\",\n \"text\": \"function Carro(){\\n\\t\\techo \\\"Classe construída!\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e26f1ecc60da7b118d03671ab9e1c08f\",\n \"score\": \"0.5769246\",\n \"text\": \"function cl_conlancamemp() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"conlancamemp\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a479cd81d114e3c2ec49791c17233de\",\n \"score\": \"0.57611275\",\n \"text\": \"static function iniciar($instancia, $proyecto)\\r\\n\\t{\\r\\n\\t\\tif(!isset($instancia) || !isset($proyecto)) {\\r\\n\\t\\t\\tthrow new toba_error('Editor: es necesario definir la instancia y proyecto a utilizar.');\\r\\n\\t\\t}\\r\\n\\t\\tself::referenciar_memoria();\\r\\n\\r\\n\\t\\tself::$memoria['instancia'] = $instancia;\\r\\n\\t\\tself::$memoria['proyecto'] = $proyecto;\\r\\n\\t\\t//Busco el ID de la base donde reside la instancia\\r\\n\\t\\t$parametros_instancia = toba::instancia()->get_datos_instancia($instancia);\\r\\n\\t\\tself::$memoria['base'] = $parametros_instancia['base'];\\r\\n\\t\\t//Averiguo el punto de acceso del editor\\r\\n\\t\\t$punto_acceso = explode('?', $_SERVER['PHP_SELF']);\\r\\n\\t\\tself::$memoria['punto_acceso'] = $punto_acceso[0];\\r\\n\\t\\tself::$memoria['conexion_limitada'] = 1;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a652733440917249af8f3aac9f3d154\",\n \"score\": \"0.5755191\",\n \"text\": \"function cl_obrasenvioreghab() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"obrasenvioreghab\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44f86597e4771d09f1fb5c88501dbcac\",\n \"score\": \"0.57543164\",\n \"text\": \"protected function get_codigo_inicializacion()\\n\\t{\\n\\t\\t$js = toba_editor::modo_prueba() ? 'window.close()' : 'salir()';\\t\\t\\n\\t\\treturn 'appLauncher.init({\\n\\t\\t\\t\\tcontainer: \\\"#enc-usuario\\\",\\n\\t\\t\\t\\tdata: ' . json_encode(array_a_utf8($this->get_app_launcher_data())) . ',\\n\\t\\t\\t\\turlAppUsrChg: '.json_encode(utf8_e_seguro(toba::vinculador()->get_url())).',\\n\\t\\t\\t\\tusrChangeParam: '. json_encode(utf8_e_seguro(apex_sesion_qs_cambio_usuario)) .',\\n\\t\\t\\t\\tjs_salir: function() { '.$js.'},\\n\\t\\t\\t});';\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b03491a1964f547f14586863d12d30ef\",\n \"score\": \"0.5744297\",\n \"text\": \"function cl_licitacaoreservacotas() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"licitacaoreservacotas\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03fa67d0adb8a8c4c61b8dd0274e7e1e\",\n \"score\": \"0.57392895\",\n \"text\": \"function cl_aguaisencaocgm() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"aguaisencaocgm\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f9bd6807e34603b24149bc5332489cf\",\n \"score\": \"0.57212466\",\n \"text\": \"function cl_cidadaofamilia() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"cidadaofamilia\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6682efeda099c93ad7bc5caf3b02c41\",\n \"score\": \"0.5712694\",\n \"text\": \"function cl_placaixaprocesso() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"placaixaprocesso\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaea1432f43ce0632b119677035fc3b9\",\n \"score\": \"0.57111883\",\n \"text\": \"function cl_condutores() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"condutores\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"256ee71681835257e49338690889991c\",\n \"score\": \"0.57083\",\n \"text\": \"function cl_tfd_acompanhantes() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"tfd_acompanhantes\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b0e76f4dd21e58bc73340f5c6cba20b\",\n \"score\": \"0.5705284\",\n \"text\": \"static public function ctrCrearOrdenCompra(){\\n\\n\\t\\tif(isset($_POST[\\\"nuevoCodigo\\\"])){\\n\\n\\t\\t\\t \\t$tabla = \\\"orden_compra\\\";\\n\\n\\t\\t\\t \\t$datos = array(\\\"codigo\\\"=>$_POST[\\\"nuevoCodigo\\\"],\\n \\\"id_proveedor\\\"=>$_POST[\\\"nuevoProveedor\\\"],\\n \\\"fecha_emision\\\"=>$_POST[\\\"nuevaFechaEmision\\\"],\\n \\\"fecha_vencimiento\\\"=>$_POST[\\\"nuevaFechaVencimiento\\\"],\\n \\\"id_centro\\\"=>$_POST[\\\"nuevoCentro\\\"],\\t\\n \\\"id_bodega\\\"=>$_POST[\\\"nuevaBodega\\\"],\\n \\\"subtotal\\\"=>$_POST[\\\"nuevoSubtotal\\\"],\\n \\\"descuento\\\"=>$_POST[\\\"nuevoTotalDescuento\\\"],\\n \\\"total_neto\\\"=>$_POST[\\\"nuevoTotalNeto\\\"],\\n \\\"iva\\\"=>$_POST[\\\"nuevoTotalIva\\\"],\\n \\\"total_final\\\"=>$_POST[\\\"nuevoTotalFinal\\\"],\\n \\\"id_medio_pago\\\"=>$_POST[\\\"nuevoMedioPago\\\"],\\n \\\"id_plazo_pago\\\"=>$_POST[\\\"nuevoPlazoPago\\\"],\\n \\\"observacion\\\"=>$_POST[\\\"nuevaObservacion\\\"],\\n \\\"productos\\\"=>$_POST[\\\"listaProductos\\\"]);\\n\\n\\n\\t\\t\\t \\t$respuesta = ModeloOrdenCompra::mdlIngresarOrdenCompra($tabla, $datos);\\n\\n\\t\\t\\t \\tif($respuesta == \\\"ok\\\"){\\n\\n\\t\\t\\t\\t\\techo'';\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\n\\t\\t}\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"253ec791ba20c889c2040131d73dde89\",\n \"score\": \"0.57050675\",\n \"text\": \"function opcion__instalar($parametros)\\n\\t{\\n\\t\\t$base = $this->modelo->get_servidor_defecto();\\n\\t\\t$this->modelo->instalar($base);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e76d0ab24c04d9bc80fc1a1029ad98b\",\n \"score\": \"0.56821895\",\n \"text\": \"public function init()\\n\\t{\\n\\n\\t\\t$cadi=$this->controlador;\\n\\t\\t//ECHO $cadi.\\\" \\\";\\n\\t\\t$cadi=strtoupper(trim($cadi[0]));\\n\\t\\t//ECHO \\\" LA PRIMER ALETRA \\\".$cadi;\\n\\t\\t$cadi=$cadi.substr($this->controlador,1);\\n\\t\\t//echo \\\" el resto \\\".substr($this->controlador,1);\\n\\t\\t$this->controlador=$cadi;\\n\\t\\t\\n\\t\\t//$this->controlador=ucwords(strtolower(trim($this->controlador)));\\n\\t\\t//$this->nombreclase=Yii::app()->explorador->nombreclase($this->nombrecampo,$this->relaciones);\\n\\t\\t\\n\\n\\n\\t\\t\\t\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2197d3963c9e1c0b6440273e88c7cba\",\n \"score\": \"0.5673667\",\n \"text\": \"public function contabilidad()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dee0c77a22a17d20cc8786007a393a2a\",\n \"score\": \"0.56555486\",\n \"text\": \"public function __construct()\\n \\t{\\n\\t\\t\\t//\\n\\t\\t\\t// Inicializacion de Variables\\n\\t\\t\\t$pagina_url_anterior = 'acceuil.php' ;\\n\\t\\t\\t$this->existe = false ;\\n\\t\\t\\t$this->borrar_con_seleccion = false ;\\n\\t\\t\\t$this->botones_extra_edicion = array();\\n\\t\\t\\t$this->botones_extra_abm = array() ;\\n\\t\\t\\t$this->acciones = array() ;\\n\\t\\t\\t//$this->acciones[] = array( 'nombre'=>'okOtraAcc' , 'texto'=>'Otra Accion' ) ;\\n\\t\\t\\t$this->lista_detalle = array() ;\\n\\t\\t\\t$this->tiene_lista_detalle = false ; // se activa en rutina de lista detalle\\n\\t\\t\\t$this->lista_detalle_enc_columnas = array();\\n\\t\\t\\t$this->clave_manual = false ; // se activa en $this->clave_manual_activar() ;\\n\\t\\t\\t$this->pagina_titulo = NULL ;\\n\\t\\t\\t//\\n\\t\\t\\t// Datos Personalizables\\n\\t\\t\\t$this->Pone_Datos_Fijos_Personalizables() ; // by DZ 2016-10-24\\n\\t\\t\\t//\\n\\t\\t\\t// Personalizacion de variables\\n\\t\\t\\t$this->Pone_Datos_Fijos_No_Heredables() ; // by DZ 2016-10-11\\n\\t\\t\\t//\\n\\t\\t\\t// Datos que no fueron seteados y dependen de otros\\n\\t\\t\\tif( ! $this->pagina_titulo ) $this->pagina_titulo = $this->nombre_tabla ;\\n\\t\\t\\t//\\n\\t\\t\\t// Botones:\\n\\t\\t\\t$this->okSalir= $this->prefijo_campo. '_okSalir';\\n\\t\\t\\t$this->okReleer= $this->prefijo_campo. '_okReleer';\\n\\t\\t\\t$this->okGrabar= $this->prefijo_campo. '_okGrabar';\\n\\t\\t\\t$this->okModificar=$this->prefijo_campo. '_okModificar';\\n\\t\\t\\t$this->okBorrarUno=$this->prefijo_campo. '_okBorrarUno';\\n\\t\\t\\t$this->okGrabaBorrarUno=$this->prefijo_campo. '_okGrabaBorrarUno';\\n\\t\\t\\t$this->okAgregar=$this->prefijo_campo. '_okAgregar';\\n\\t\\t\\t$this->okVer=$this->prefijo_campo. '_okVer';\\n\\t\\t\\t$this->okGrabaAgregar= $this->prefijo_campo. '_okGrabaAgregar';\\n\\t\\t\\t$this->okExportar = $this->prefijo_campo. '_okExportar' ;\\n\\t\\t\\t$this->okListaSiguiente = $this->prefijo_campo. '_okListaSiguiente' ;\\n\\t\\t\\t$this->okListaAnterior = $this->prefijo_campo. '_okListaAnterior' ;\\n\\t\\t\\t$this->okListaPrimero = $this->prefijo_campo. '_okListaPrimero' ;\\n\\t\\t\\t$this->okListaUltimo = $this->prefijo_campo. '_okListaUltimo' ;\\n\\t\\t\\t$this->okListaPrimero = $this->prefijo_campo. '_okListaPrimero' ;\\n\\t\\t\\t$this->okListaPosicion = $this->prefijo_campo. '_okListaPosicion' ;\\n\\t\\t\\t\\n\\t\\t\\t//\\n\\t\\t\\t// Personalizacion de variables\\n\\t\\t\\t// by DZ 2015-08-15 $this->Pone_Datos_Fijos_No_Heredables() ; \\t\\t\\t\\t\\t\\t\\t\\t\\t// by DZ 2015-08-14 - agregado lista de datos\\n\\t\\t\\t$this->con_filtro_fecha = false ;\\n\\t\\t\\tforeach( $this->lista_campos_lista as $campo )\\n\\t\\t\\t{\\n\\t\\t\\t\\tif ( $campo->nombre() ) $this->con_filtro_general = true;\\n\\t\\t\\t\\tbreak ;\\n\\t\\t\\t}\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f15caf8ee8a9d5d65f1a614dce77b73c\",\n \"score\": \"0.5643145\",\n \"text\": \"public function generarCodigo() {\\n $cantProyectos = $this->all()->count();\\n $codigo = \\\"\\\";\\n $codigoEncript = \\\"\\\";\\n $caracteres = \\\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJCLMNOPQRSTUVWXYZ1234567890\\\";\\n $existe = true;\\n\\n while ($existe) {\\n $cantAleatorio = rand(5, 8);\\n $aleatorio = '';\\n for ($i = 0; $i < $cantAleatorio; $i++) {\\n $caracter = rand(0, strlen($caracteres));\\n $caracter = substr($caracteres, $caracter, 1);\\n $aleatorio = $aleatorio . '' . $caracter;\\n }\\n\\n $codigo = \\\"pro_invs_\\\" . $cantProyectos. '_' . $aleatorio;\\n $codigoEncript = Crypt::encrypt($codigo);\\n\\n $pr = $this->where('pro_codigo', $codigoEncript)->get();\\n if (count($pr) < 1) {\\n $existe = FALSE;\\n $this->pro_codigo = $codigoEncript;\\n return $codigo;\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"998a805a976602ea511d456ffc373d9d\",\n \"score\": \"0.5641728\",\n \"text\": \"function opcion__cli_configurar()\\n\\t{\\n\\t\\t$parametros = $this->get_parametros();\\n\\t\\t$proyecto = $this->get_proyecto();\\n\\t\\t$servicio = toba_modelo_catalogo::get_servicio_web($proyecto, $this->get_servicio_cli(), $this->consola);\\n\\t\\n\\t\\t$dir_instalacion = $proyecto->get_dir_instalacion_proyecto();\\n\\t\\tif (! toba_modelo_servicio_web::existe_archivo_certificado($proyecto)) {\\n\\t\\t\\t$this->consola->error(\\\"No existe la clave privada/certificado del proyecto en '$dir_instalacion/privada.key'. Puede generarlos usando el comando generar_cert\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\n\\t\\tif (!isset($parametros['-c'])) {\\n\\t\\t\\t$this->consola->error(\\\"Debe incluir el parametro -c con la ruta al archivo de certificado del servidor\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\n\\t\\tif (! file_exists($parametros['-c'])) {\\n\\t\\t\\t$this->consola->error(\\\"No fue posible encontrar el certificado en '{$parametros['-c']}'\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\n\\t\\t\\t\\n\\t\\t//Se especifico una URL?\\n\\t\\t$url_sistema = null;\\n\\t\\tif (isset($parametros['-u'])) {\\n\\t\\t\\t$url_sistema = $parametros['-u'];\\n\\t\\t}\\n\\t\\t\\n\\t\\t//Genera configuracion\\n\\t\\t$servicio->generar_configuracion_cliente($parametros['-c'], $url_sistema);\\n\\t\\n\\t\\t$this->consola->mensaje(\\\"Ok. Certificado del servidor importado correctamente en el cliente\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"684958b3c11c7f0e3c6eebcad1cd93bf\",\n \"score\": \"0.5639352\",\n \"text\": \"function cl_tipoidentificacaocredor() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"tipoidentificacaocredor\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fba87444bb329647592fd936d8040df\",\n \"score\": \"0.56382966\",\n \"text\": \"function ApopapParaCrearNuevoGrupo() {\\n $oLLaboratorio = new LLaboratorio();\\n $arrayFilas = $oLLaboratorio->LEstadoVersicion();\\n require_once('../../../hospitalizacion/cvista/laboratorio/vistacrearNuevoGrupo.php');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"905675f1f8ee753620191a90a2ef8f22\",\n \"score\": \"0.56302136\",\n \"text\": \"protected function generar_paginado()\\n\\t{\\n\\t\\t$this->_cantidad_paginas = 1;\\t\\t//Inicializo la cantidad de paginas.\\n\\n\\t\\tswitch ($this->_info_cuadro['tipo_paginado'])\\n\\t\\t{\\n\\t\\t\\tcase 'C':\\t\\t//Paginado a cargo del CI\\n\\t\\t\\t\\tif (!isset($this->_total_registros) || ! is_numeric($this->_total_registros)) {\\n\\t\\t\\t\\t\\t\\tthrow new toba_error_def(\\\"El cuadro necesita recibir la cantidad total de registros con el metodo set_total_registros para poder paginar\\\");\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$this->_cantidad_paginas = ceil($this->_total_registros/$this->_tamanio_pagina);\\n\\t\\t\\t\\tif ($this->_pagina_actual > $this->_cantidad_paginas) {\\n\\t\\t\\t\\t\\t$this->_pagina_actual = 1;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'P':\\t\\t//Paginado Propio\\n\\t\\t\\t\\tif($this->_total_registros > 0) {\\n\\t\\t\\t\\t\\t// 2) Calculo la cantidad de paginas\\n\\t\\t\\t\\t\\t$this->_cantidad_paginas = ceil($this->_total_registros/$this->_tamanio_pagina);\\n\\t\\t\\t\\t\\tif ($this->_pagina_actual > $this->_cantidad_paginas) {\\n\\t\\t\\t\\t\\t\\t$this->_pagina_actual = 1;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$offset = ($this->_pagina_actual - 1) * $this->_tamanio_pagina;\\n\\t\\t\\t\\t\\t$this->datos = array_slice($this->datos, $offset, $this->_tamanio_pagina);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c26af7d6cfe9fb4e44dcdacf50f9c582\",\n \"score\": \"0.56253576\",\n \"text\": \"public function principal(){\\n\\t\\t$objeto = new modelo();\\n\\t\\t$data[\\\"titulo\\\"] = \\\"Inicio\\\";\\n\\t\\t$data[\\\"objeto\\\"] = $objeto->getDocentes();\\n\\n\\t\\t//mandando información del modelo a la vista\\n\\t\\trequire_once \\\"vista/bienvenidaPrueba.php\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02d0e60a3870d4b0fa43ff82fc4944c7\",\n \"score\": \"0.56241155\",\n \"text\": \"function arrancar(){ //metodo o funcionalidad\\n\\t\\t//ejecuta todo el metodo de la clase padre y luego podemos darle cosas nuevas particulares\\n\\t\\tparent::arrancar();\\n\\t\\techo \\\"El camion ya ha arrancado
\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88d5cacff137b17bb68776b0e14e850e\",\n \"score\": \"0.5614011\",\n \"text\": \"function __construct($codProdotto, $codAppuntamento, $nome, $marca, $tipo, $utilizzo) {\\n\\t\\t$this->codProdotto = $codProdotto;\\n\\t\\t$this->codAppuntamento = $codAppuntamento;\\n\\t\\t$this->nome = $nome;\\n\\t\\t$this->marca = $marca;\\n\\t\\t$this->tipo = $tipo;\\n\\t\\t$this->utilizzo = $utilizzo;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd3e99b7598be9159c17e892d4702c0b\",\n \"score\": \"0.56070745\",\n \"text\": \"function opcion__instalar($parametros)\\n\\t{\\t\\t\\n\\t\\t$base = $this->modelo->get_servidor_defecto();\\n\\t\\tif (isset($parametros['--base-nombre'])) {\\n\\t\\t\\t$base['base'] = $parametros['--base-nombre'];\\n\\t\\t}\\n\\t\\tif (isset($parametros['--base-schema'])) {\\n\\t\\t\\t$base['schema'] = $parametros['--base-schema'];\\n\\t\\t}\\n\\t\\t$this->modelo->instalar($base);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb3a5fefdf418c95f98ebc46d6eeb64a\",\n \"score\": \"0.5603025\",\n \"text\": \"static public function ctrCrearCompra(){\\n\\n\\t\\tif(isset($_POST[\\\"nuevaCompra\\\"])){\\n\\n\\n\\t\\t\\t/*=============================================\\n\\t\\t\\tGUARDAR LA COMPRA\\n\\t\\t\\t=============================================*/\\t\\n\\n\\t\\t\\t$tabla = \\\"compras\\\";\\n\\n\\t\\t\\t$datos = array(\\\"id_usuario\\\"=>$_POST[\\\"idComprador\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"id_proveedor\\\"=>$_POST[\\\"seleccionarProveedor\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"codigo\\\"=>$_POST[\\\"nuevaCompra\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"compras\\\"=>$_POST[\\\"listaProductosCompra\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"total\\\"=>$_POST[\\\"totalVenta\\\"]);\\n\\n\\t\\t\\t//var_dump($datos);\\n\\t\\t\\t$respuesta = ModeloCompras::mdlIngresarCompras($tabla, $datos);\\n\\t\\t\\t//var_dump($respuesta);\\n\\n\\t\\t\\tif($respuesta == \\\"ok\\\"){\\n\\n\\t\\t\\t\\techo'';\\n\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86d8599139029e12e375ee2d77caef54\",\n \"score\": \"0.5602218\",\n \"text\": \"function cl_iptuconstr() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"iptuconstr\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"312c23238d356bf92f976cc2ba4e31d5\",\n \"score\": \"0.55994004\",\n \"text\": \"function cl_benscorr() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"benscorr\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35d5bd553d3624ab7a8870e61cf9d570\",\n \"score\": \"0.5595808\",\n \"text\": \"public function crearCultivo()\\n {\\n $this->validarSesion();\\n $finca = $this->fincaModelo->mostrarFinca($_SESSION['id_finca']);\\n $datos = [\\n 'finca' => $finca[0]->nombre_finca,\\n ];\\n $this->vista(\\\"crearcultivo/crearcultivo\\\", $datos);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be442ec7eecf3c712ebfc68211f1e12d\",\n \"score\": \"0.55952805\",\n \"text\": \"public function comprobarControlador() {\\r\\n if (file_exists('controllers/' . $this->controller . '.php')) {\\r\\n //echo '
El controlador ' . $this->controller . ' existe.
';\\r\\n\\r\\n // Cargo el controlador\\r\\n require_once 'controllers/' . $this->controller . '.php';\\r\\n\\r\\n // Creo el Objeto controller\\r\\n $this->controllerObj = new $this->controller;\\r\\n \\r\\n\\r\\n } else {\\r\\n echo '
';\\r\\n die();\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0c02a8697473f22125e3e3cc77471b4\",\n \"score\": \"0.5593684\",\n \"text\": \"function cl_cgm() { \\r\\n //classes dos rotulos dos campos\\r\\n $this->rotulo = new rotulo(\\\"cgm\\\"); \\r\\n\\t $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"]['PHP_SELF']);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"319bd72f624423ed1d60ca47fcd65f7a\",\n \"score\": \"0.55903757\",\n \"text\": \"function opcion__serv_configurar()\\n\\t{\\n\\t\\t$parametros = $this->get_parametros();\\n\\t\\t$proyecto = $this->get_proyecto();\\n\\t\\t$servicio = toba_modelo_catalogo::get_servicio_web($proyecto, $this->get_servicio_serv(), $this->consola);\\n\\n\\t\\t$dir_instalacion = $proyecto->get_dir_instalacion_proyecto();\\n\\t\\tif (! toba_modelo_servicio_web::existe_archivo_certificado($proyecto)) {\\n\\t\\t\\t$this->consola->error(\\\"No existe la clave privada/certificado del proyecto en '$dir_instalacion/privada.key'. Puede generarlos usando el comando generar_cert\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\t\\t\\n\\t\\tif (!isset($parametros['-c'])) {\\n\\t\\t\\t$this->consola->error(\\\"Debe incluir el parametro -c con la ruta al archivo de certificado del cliente\\\");\\n\\t\\t\\tdie;\\t\\t\\t\\n\\t\\t}\\n\\t\\tif (! file_exists($parametros['-c'])) {\\n\\t\\t\\t$this->consola->error(\\\"No fue posible encontrar el certificado en '{$parametros['-c']}'\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif (!isset($parametros['-h'])) {\\n\\t\\t\\t$this->consola->error(\\\"Debe incluir el parametro -h con los pares clave=valor que identifican al cliente\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\n\\t\\t\\n\\t\\t//Parseo el ID del cliente\\n\\t\\t$headers = array();\\n\\t\\t$param_headers = explode(\\\",\\\", trim($parametros['-h']));\\n\\t\\tforeach ($param_headers as $param_header) {\\n\\t\\t\\tlist($clave, $valor) = explode(\\\"=\\\", trim($param_header));\\n\\t\\t\\t$headers[$clave] = $valor;\\n\\t\\t}\\t\\t\\n\\t\\t\\n\\t\\t//Genera configuracion\\n\\t\\t$servicio->generar_configuracion_servidor($parametros['-c'], $headers);\\n\\n\\t\\t$this->consola->mensaje(\\\"Ok. Certificado del cliente importado correctamente en el servidor\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b56affde19cc26b9ad917bd4eefaf35e\",\n \"score\": \"0.55891716\",\n \"text\": \"function CompraVehiculo($miGama) {\\n echo \\\"construct de la clase CompraVehiculo
ha llegado $miGama
\\\";\\n self::$ayuda = 1000;\\n\\n $this->gama=$miGama;\\n \\n if ($miGama == \\\"urbano\\\") {\\n $this->preciobase = 10000;\\n } else if ($miGama == \\\"compacto\\\") {\\n $this->preciobase = 20000;\\n } else if ($miGama == \\\"berlina\\\") {\\n $this->preciobase = 30000;\\n }\\n \\n \\n\\n echo \\\"$this->gama precio base es = \\\" . $this->preciobase . \\\"
\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bc7215a2afa474a3f02c0bdcf5ba7e2\",\n \"score\": \"0.55759203\",\n \"text\": \"public function descargaPdfComfiar($idTxComfiar = null, $nroComprobante = null, $sessionId = null, $fechaVenc = null, $tipComp = null, $pk_factura_codigo = null) {\\n log_info($this->logHeader . 'INGRESO CONTROLADOR FACTURA ELECTRONICA GENERAR PDF ID_tx_comfiar= ' . $idTxComfiar . ' No_comprobante = ' . $nroComprobante . ' Pk_factura = ' . $pk_factura_codigo . ' Tipo_Comprobante = ' . $tipComp);\\n $codRespuesta = 0;\\n $mensajeRespuesta;\\n if (!empty($idTxComfiar) && !empty($nroComprobante) && !empty($sessionId) && !empty($fechaVenc) && !empty($tipComp) && !empty($pk_factura_codigo)) {\\n\\n $resultRespuestaCom = $this->facturacionelectronicaminero->descarga_pdf($sessionId, $fechaVenc, $idTxComfiar, $nroComprobante, $tipComp, $pk_factura_codigo);\\n $codRespuesta = $resultRespuestaCom->CodRespuesta;\\n $mensajeRespuesta = $resultRespuestaCom->Respuesta;\\n if ($codRespuesta == 0) {\\n $mensajeRespuesta = 'Error consumiendo SOAP DescargarPdf comfiar';\\n log_info($this->logHeader . $this->errorComfiar . 'Error consumiendo SOAP DescargarPdf comfiar, en funcion -descargaPdfComfiar-');\\n }\\n } else {\\n $mensajeRespuesta = 'Datos incorrectos ';\\n log_info($this->logHeader . $this->errorGeneral . ' Datos nulos idTxComfiar, nroComprobante, sessionId , fechaVenc tipComp, en funcion -descargaPdfComfiar-');\\n }\\n $objectRespuesta = (object) [\\n 'CodRespuesta' => $codRespuesta,\\n 'Respuesta' => $mensajeRespuesta];\\n return $objectRespuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85e3a5086d664bf50256bf2bd3e3abc7\",\n \"score\": \"0.5559287\",\n \"text\": \"function opcion__generar_cert()\\n\\t{\\t\\t\\n\\t\\t$parametros = $this->get_parametros();\\n\\t\\t//Creo el directorio para el servicio web\\n\\t\\t$proyecto = $this->get_proyecto();\\n\\t\\t$dir_instalacion = $proyecto->get_dir_instalacion_proyecto();\\t\\t\\n\\t\\tif (toba_modelo_servicio_web::existe_archivo_certificado($proyecto) && ! isset($parametros['-r'])) {\\n\\t\\t\\t$this->consola->error(\\\"Ya existe la clave privada del proyecto en '$dir_instalacion/privada.key'. Para sobreescribirla indique el parametro -r\\\");\\n\\t\\t\\tdie;\\n\\t\\t}\\n\\t\\t\\n\\t\\ttry {\\n\\t\\t\\ttoba_modelo_servicio_web::generar_certificados($proyecto, $dir_instalacion);\\n\\t\\t\\t$this->consola->mensaje(\\\"Ok. Certificado publico generado en:\\\");\\n\\t\\t\\t$this->consola->mensaje(\\\"$dir_instalacion/publica.crt\\\");\\t\\t\\t\\t\\n\\t\\t} catch (toba_error_usuario $e) {\\n\\t\\t\\t$this->consola->mensaje('Se ha producido un error durante el proceso', true);\\n\\t\\t\\t$this->consola->error($e->getMessage());\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fab14b2aaaeb808bae8bafe9196a775\",\n \"score\": \"0.5556881\",\n \"text\": \"function mostrarRegistro() {\\r\\n \\r\\n if(isset($_REQUEST['codProyecto']))\\r\\n {\\r\\n $codProyecto=$_REQUEST['codProyecto'];\\r\\n $nombreProyecto=$_REQUEST['nombreProyecto'];\\r\\n $variable=array($codProyecto,$nombreProyecto);\\r\\n }else if(isset($_REQUEST['codProyecto']) && isset($_REQUEST['planEstudio']))\\r\\n {\\r\\n $codProyecto=$_REQUEST['codProyecto'];\\r\\n $nombreProyecto=$_REQUEST['nombreProyecto'];\\r\\n $variable=array($codProyecto,$nombreProyecto);\\r\\n }else\\r\\n {\\r\\n $cadena_sql=$this->sql->cadena_sql(\\\"datos_coordinador\\\",$this->usuario);\\r\\n $resultado_datosCoordinador=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\\\"busqueda\\\" );\\r\\n\\r\\n $_REQUEST['codProyecto']=$codProyecto=$resultado_datosCoordinador[0][0];\\r\\n $_REQUEST['nombreProyecto']=$nombreProyecto=$resultado_datosCoordinador[0][1];\\r\\n \\r\\n $variable=array($codProyecto,$nombreProyecto);\\r\\n }\\r\\n\\r\\n $this->menuCoordinador($variable);\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1ead2737f757cdf37a07108e80f660c\",\n \"score\": \"0.55563426\",\n \"text\": \"function cl_rhdirfgeracaopessoalpensionistavalor() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"rhdirfgeracaopessoalpensionistavalor\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b952244ce002af4786a9a52100d2547\",\n \"score\": \"0.5544413\",\n \"text\": \"function cl_caddisciplina() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"caddisciplina\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ac791cee485364d01d43ede614c132d\",\n \"score\": \"0.55418116\",\n \"text\": \"private function cadastrar_produto($infoproduto){\\n\\t\\t$autogravarprodxml = explode(\\\"|\\\", $this->param_notafiscal_autogravarprodxml);\\n\\t\\tif($autogravarprodxml[0] === \\\"S\\\"){\\n\\t\\t\\t// Verifica se o parametro esta preenchido da forma correta\\n\\t\\t\\tif(count($autogravarprodxml) < 12){\\n\\t\\t\\t\\t$this->error = \\\"O parâmetro AUTOGRAVARPRODXML está incompleto, impossibilitando o cadastro de novos produtos de forma automática.
Clique aqui para abrir o parâmetro e configurar corretamente.\\\";\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Inicia a transacao no banco de dados\\n\\t\\t\\t$this->con->start_transaction();\\n\\t\\t\\tif(strlen($infoproduto[\\\"ncm\\\"]) == 8){\\n\\t\\t\\t\\t$ncm = objectbytable(\\\"ncm\\\", NULL, $this->con);\\n\\t\\t\\t\\t$codigoncm = substr($infoproduto[\\\"ncm\\\"], 0,4).\\\".\\\".substr($infoproduto[\\\"ncm\\\"], 4,2).\\\".\\\".substr($infoproduto[\\\"ncm\\\"], 6,2);\\n\\t\\t\\t\\t$ncm->setcodigoncm($codigoncm);\\n\\t\\t\\t\\t$arr_ncm = object_array($ncm);\\n\\t\\t\\t\\t$ncm = NULL;\\n\\t\\t\\t\\tif(count($arr_ncm) > 0){\\n\\t\\t\\t\\t\\t$ncm = array_shift($arr_ncm);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif(is_null($ncm)){\\n\\t\\t\\t\\t\\t$this->con->start_transaction();\\n\\t\\t\\t\\t\\t$ncm = objectbytable(\\\"ncm\\\", NULL, $this->con);\\n\\t\\t\\t\\t\\t$ncm->setcodcfnfe($autogravarprodxml[6]);\\n\\t\\t\\t\\t\\t$ncm->setcodcfnfs($autogravarprodxml[7]);\\n\\t\\t\\t\\t\\t$ncm->setcodcfpdv($autogravarprodxml[8]);\\n\\t\\t\\t\\t\\t$ncm->setcodigoncm($codigoncm);\\n\\t\\t\\t\\t\\t$ncm->setcodipi($autogravarprodxml[9]);\\n\\t\\t\\t\\t\\t$ncm->setcodpiscofinsent($autogravarprodxml[4]);\\n\\t\\t\\t\\t\\t$ncm->setcodpiscofinssai($autogravarprodxml[5]);\\n\\t\\t\\t\\t\\t$ncm->setdescricao($codigoncm);\\n\\t\\t\\t\\t\\tif(!$ncm->save()){\\n\\t\\t\\t\\t\\t\\t$this->error = $_SESSION[\\\"ERROR\\\"];\\n\\t\\t\\t\\t\\t\\treturn FALSE;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$this->con->commit();\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t// Cria o cadastro principal do produto\\n\\t\\t\\t$produto = objectbytable(\\\"produto\\\", NULL, $this->con);\\n\\t\\t\\t$produto->setdescricao($infoproduto[\\\"descricao\\\"]);\\n\\t\\t\\t$produto->setdescricaofiscal($infoproduto[\\\"descricao\\\"]);\\n\\t\\t\\t//$produto->setprecovrj($infoproduto[\\\"preco\\\"]);\\n\\t\\t\\t//$produto->setprecoatc($infoproduto[\\\"preco\\\"]);\\n\\t\\t\\t$produto->setcoddepto($autogravarprodxml[1]);\\n\\t\\t\\t$produto->setcodgrupo($autogravarprodxml[2]);\\n\\t\\t\\t$produto->setcodsubgrupo($autogravarprodxml[3]);\\n\\t\\t\\t$produto->setcodpiscofinsent($autogravarprodxml[4]);\\n\\t\\t\\t$produto->setcodpiscofinssai($autogravarprodxml[5]);\\n\\t\\t\\t$produto->setcodcfnfe($autogravarprodxml[6]);\\n\\t\\t\\t$produto->setcodcfnfs($autogravarprodxml[7]);\\n\\t\\t\\t$produto->setcodcfpdv($autogravarprodxml[8]);\\n\\t\\t\\t$produto->setcodipi($autogravarprodxml[9]);\\n\\t\\t\\t$produto->setcodembalcpa($autogravarprodxml[10]);\\n\\t\\t\\t$produto->setcodembalvda($autogravarprodxml[11]);\\n\\t\\t\\tif(!is_null($ncm)){\\n\\t\\t\\t\\t$produto->setidncm($ncm->getidncm());\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$produto->setidncm($autogravarprodxml[12]);\\n\\t\\t\\t}\\n\\t\\t\\t$produto->setforalinha(\\\"N\\\");\\n\\t\\t\\t$produto->setprecovariavel(\\\"N\\\");\\n\\t\\t\\t$produto->setpesado(\\\"N\\\");\\n\\t\\t\\t$produto->setvasilhame(\\\"N\\\");\\n\\t\\t\\t$produto->setflutuante(\\\"N\\\");\\n\\t\\t\\t$produto->setatualizancm(\\\"N\\\");\\n\\t\\t\\t$produto->setcontrnumeroserie(\\\"N\\\");\\n\\t\\t\\t$produto->setcontrnumerolote(\\\"N\\\");\\n\\t\\t\\t$produto->setalcoolico(\\\"N\\\");\\n\\t\\t\\tif(!$produto->save()){\\n\\t\\t\\t\\t$this->error = $_SESSION[\\\"ERROR\\\"];\\n\\t\\t\\t\\t$this->con->rollback();\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Cria o EAN para o produto\\n\\t\\t\\t$produtoean = objectbytable(\\\"produtoean\\\", NULL, $this->con);\\n\\t\\t\\t$produtoean->setcodproduto($produto->getcodproduto());\\n\\t\\t\\tif(strlen($infoproduto[\\\"codean\\\"]) === 0){\\n\\t\\t\\t\\t$infoproduto[\\\"codean\\\"] = plutoean13($produto->getcodproduto());\\n\\t\\t\\t}\\n\\t\\t\\t$produtoean->setcodean($infoproduto[\\\"codean\\\"]);\\n\\t\\t\\tif(!$produtoean->save()){\\n\\t\\t\\t\\t$this->error = $_SESSION[\\\"ERROR\\\"];\\n\\t\\t\\t\\t$this->con->rollback();\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Cria a relacao entre o produto e fornecedor\\n\\t\\t\\tif(strlen($infoproduto[\\\"reffornec\\\"]) > 0){\\n\\t\\t\\t\\t$prodfornec = objectbytable(\\\"prodfornec\\\", NULL, $this->con);\\n\\t\\t\\t\\t$prodfornec->setcodproduto($produto->getcodproduto());\\n\\t\\t\\t\\t$prodfornec->setcodfornec($this->fornecedor->getcodfornec());\\n\\t\\t\\t\\t$prodfornec->setreffornec($infoproduto[\\\"reffornec\\\"]);\\n\\t\\t\\t\\tif(!$prodfornec->save()){\\n\\t\\t\\t\\t\\t$this->error = $_SESSION[\\\"ERROR\\\"];\\n\\t\\t\\t\\t\\t$this->con->rollback();\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Inclui o produto na lista de encontrados\\n\\t\\t\\t$this->arr_produto_encontrado[] = array(\\n\\t\\t\\t\\t\\\"codproduto\\\" => $produto->getcodproduto(),\\n\\t\\t\\t\\t\\\"xml\\\" => $infoproduto[\\\"xml\\\"]\\n\\t\\t\\t);\\n\\n\\t\\t\\t// Finaliza o processo com sucesso\\n\\t\\t\\t$this->con->commit();\\n\\t\\t\\treturn true;\\n\\t\\t}else{\\n\\t\\t\\t$this->error = \\\"O parâmetro AUTOGRAVARPRODXML está desabilitado.\\\";\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cdde1c77f6a0477fc44024f3729de5a\",\n \"score\": \"0.5528937\",\n \"text\": \"private function omision() {\\n $this->aPropietarios = array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e26854444f218b9c3740b96a41ab5079\",\n \"score\": \"0.5518702\",\n \"text\": \"function cl_autorec() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"autorec\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"030c3e9dcfa6c0bbd78ed91b07482b66\",\n \"score\": \"0.5511845\",\n \"text\": \"function cl_avaliacaoestruturafrequencia() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"avaliacaoestruturafrequencia\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d68d89372c0f5c7ca5a15267af335aa\",\n \"score\": \"0.5509194\",\n \"text\": \"public static function cargarProducto(){\\n $productoNuevo = new self();\\n $productoNuevo->id = $_POST[\\\"id\\\"];\\n $productoNuevo->nombre = $_POST[\\\"nombre\\\"];\\n $productoNuevo->precio = $_POST[\\\"precio\\\"];\\n $productoNuevo->usuarioCarga = $_POST[\\\"usuarioCarga\\\"];\\n $productoNuevo->foto = self::CargarFoto();\\n $productoNuevo->GuardarProducto();\\n return \\\"Producto Guardado\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"634398da66b707189c25ae20d12eff63\",\n \"score\": \"0.55040765\",\n \"text\": \"function cl_db_cadattdinamicoatributos() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"db_cadattdinamicoatributos\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9357344754b9ef04ad00971818304042\",\n \"score\": \"0.54967266\",\n \"text\": \"function cl_infracaotransito() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"infracaotransito\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3424f2d85ae2b3c72c780986aa169c0e\",\n \"score\": \"0.54919606\",\n \"text\": \"function procesarCobroMensual(){\\r\\n\\t\\t$dbo = JFactory::getDBO();\\r\\n\\t\\t$con = $dbo->getConnection();\\r\\n\\t\\t//pasos\\r\\n\\t\\t\\r\\n\\t\\t//validar que el proceso se ejecuta a partir del dia 6 \\r\\n\\t\\t\\r\\n\\t\\t$esDiaDeCorte = validarDiaCorte($con);\\r\\n\\t\\t//echo \\\"
\\\";\\r\\n\\t\\tif ($esDiaDeCorte){\\r\\n\\t\\t\\techo \\\"
\\\";\\r\\n\\t\\t}else{\\r\\n\\t\\t\\techo \\\"
\\\".date(\\\"d-m-Y\\\").\\\" Aun no es dia de corte
\\\";\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t} \\r\\n\\t\\t\\r\\n\\t\\t//1 seleccionar clientes que no tengan movimiento DMS (debito mensual por servicio) \\r\\n\\t\\t//para el mes actual \\r\\n\\t\\t// y que no tengan saldo negativo\\r\\n\\t\\t//retornar cedula y plan \\r\\n\\t\\t$sql = \\t\\\"SELECT b.tax_code, c.pln_valor, b.name \\r\\n\\t\\t\\t\\t\\tFROM bamboo_clients AS b \\r\\n\\t\\t\\t\\t\\tINNER JOIN cpz_plan AS c ON b.plan = c.pln_id \\r\\n\\t\\t\\t\\t\\tWHERE b.status = '1' \\r\\n\\t\\t\\t\\t\\tAND b.tax_code \\r\\n\\t\\t\\t\\t\\tNOT IN (\\r\\n\\t\\t\\t\\t\\tSELECT cmv_cli_tax_code \\r\\n\\t\\t\\t\\t\\tFROM cpz_cli_mov \\r\\n\\t\\t\\t\\t\\tWHERE cmv_tipopago = 'DMS' \\r\\n\\t\\t\\t\\t\\tAND MONTH( cmv_fecha ) = MONTH( CURDATE() ) \\r\\n\\t\\t\\t\\t\\tAND YEAR( cmv_fecha ) = YEAR( CURDATE() )\\r\\n\\t\\t\\t\\t\\t);\\\";\\r\\n\\t\\t\\t\\t//echo $sql;\\r\\n\\t\\t$result = util_ejecutarSql($sql, $con);\\r\\n\\t\\t\\r\\n\\t\\tif(($nro = mysql_num_rows($result)) == 0){\\r\\n\\t\\t\\techo \\\"
\\\";\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}else{\\r\\n\\t\\t\\techo \\\"
\\\";\\r\\n\\t\\t\\techo \\\"
\\\";\\r\\n\\t\\r\\n\\t\\t\\t$sIpline = \\\"\\\";\\r\\n\\t\\t\\twhile ($row = mysql_fetch_assoc($result)) {\\r\\n\\t\\t\\t\\t\\r\\n\\r\\n\\t\\t\\t\\t// si no existe el registro DMS para el cliente en el mes actual, crearlo\\t\\r\\n\\t\\t\\t\\tif(!existeRefDMS($row['tax_code'],$con)){\\r\\n\\t\\t\\t\\t\\t//monto actual de cobro, deuda en el mes en curso del cliente \\r\\n\\t\\t\\t\\t\\t$valorDMS = obtenerValorDMS($con,$row['tax_code']);\\r\\n\\t\\t\\t\\t\\techo \\\"
$$$ >> valorDMS \\\".$valorDMS.\\\"
\\\";\\r\\n\\t\\t\\t\\t\\t//2 crear movimiento DMS (debito mensual por servicio) para los clientes seleccionados.\\r\\n\\t\\t\\t\\t\\t//por mas veces que se ejecute esta rutina solo se registrara una vez por cliente un movimiento DMS mensual\\t \\r\\n\\t\\t\\t\\t\\t$sql = \\\"INSERT INTO `cocompaz_jml1`.`cpz_cli_mov` \\r\\n\\t\\t\\t\\t\\t\\t(\\r\\n\\t\\t\\t\\t\\t\\t\\t`cmv_id` ,`cmv_cli_tax_code`,`cmv_pagcsv_ref` ,`cmv_tipomov` ,\\r\\n\\t\\t\\t\\t\\t\\t\\t`cmv_monto`,`cmv_tipopago`,\\t`cmv_fecha`,`cmv_fechareg`,cmv_refex\\r\\n\\t\\t\\t\\t\\t\\t)VALUES (NULL,\\r\\n\\t\\t\\t\\t\\t\\t\\t'\\\".$row['tax_code'].\\\"',NULL,'-1', \\r\\n\\t\\t\\t\\t\\t\\t\\t'\\\".$valorDMS.\\\"','DMS',\\r\\n\\t\\t\\t\\t\\t\\t\\tSYSDATE(),SYSDATE(),NULL\\r\\n\\t\\t\\t\\t\\t\\t);\\\";\\r\\n\\t\\t\\t\\t\\t\\techo $sql;\\r\\n\\t\\t\\t\\t\\tmysql_query($sql, $con);\\r\\n\\t\\t\\t\\t\\techo \\\"
Creando DMS - Nombre: \\\".$row['name'].\\\"cedula: \\\".$row['tax_code'].\\\" monto: \\\".$valorDMS;\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\t//echo \\\"
Existe DMS - Nombre: \\\".$row['name'].\\\"cedula: \\\".$row['tax_code'].\\\" monto: \\\".$valorDMS;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//mysql_free_result($result);\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f37e0442c785a19e3fa51801a52a322e\",\n \"score\": \"0.54882354\",\n \"text\": \"function accion_iniciarCatalogo() {\\n\\tglobal $aplicacion, $url_base, $variables_ruta, $controlador, $accion;\\n\\n\\t/** @ignore */\\n\\t// Incluye el modelo que corresponde\\n\\n\\tinclude_once('modelo/catalogoModelo.php');\\t\\n $titulo = generarTitulo();\\n $catalogoPrincipal= cargarPrincipal();\\n \\n\\t/** @ignore */\\n\\t// Pasa a la vista toda la informacion que se desea representar\\n\\t\\n include('vista/catalogoVista.php'); \\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaa7c3b598830b8071f945371dd1addd\",\n \"score\": \"0.5484162\",\n \"text\": \"public function enviarComprobante($datos)\\n {\\n $comprobante = new Comprobante($this->container, $datos);\\n return $comprobante->enviar(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ced39dc5fc84c53bd5496d1e54d553f2\",\n \"score\": \"0.5479199\",\n \"text\": \"private function inizializzazione()\\n {\\n\\n $token = bin2hex(openssl_random_pseudo_bytes(16));\\n $arrivo = new Arrivo();\\n\\n $_SESSION[$token] = $arrivo;\\n\\n $this->vaiDataPiuStruttura($token);\\n exit;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20dc41499ea9ebd77a757e8be0985818\",\n \"score\": \"0.5477821\",\n \"text\": \"function setaPropriedade()\\r\\n\\t{\\r\\n\\t\\tparent::setaPropriedade();\\r\\n\\t\\tif(isset($this->arrRequest['strAcao'])){$this->strAcao = $this->arrRequest['strAcao'];}\\r\\n\\t\\tif(isset($this->arrRequest['strBotao'])){$this->strBotao = $this->arrRequest['strBotao'];}\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69a9d0d1014223bfbe6e8891483c65f3\",\n \"score\": \"0.54768384\",\n \"text\": \"function cxccxcp()\\n\\t{\\n\\t\\t$listaPagos = $this->ChequesModel->pagosCobrosSinAsignar($_POST['id'],$_REQUEST['tipo'],$_REQUEST['moneda']);\\n\\t\\t$datos = '';\\n\\t\\tif($_REQUEST['cambio']<1){\\n\\t\\t\\t$_REQUEST['cambio']=1;\\n\\t\\t}\\n\\t\\twhile($p = $listaPagos->fetch_object())\\n\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t$datos .= \\\"
\\\";\\n\\t\\t\\t\\n\\t\\t}\\t\\n\\t\\techo $datos;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70938d61bcfffbba1756107f4d85b0a9\",\n \"score\": \"0.54767877\",\n \"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\\\"].\\\"/validacion/validaciones.class.php\\\");\\n include_once($configuracion[\\\"raiz_documento\\\"].$configuracion[\\\"clases\\\"].\\\"/procedimientos.class.php\\\");\\n\\n $this->configuracion=$configuracion;\\n $this->validacion=new validarInscripcion();\\n $this->procedimientos=new procedimientos();\\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 $this->accesoGestion=$this->conectarDB($configuracion,\\\"mysqlsga\\\");\\n\\n //Datos de sesion\\n $this->formulario=\\\"registro_generarReciboPago\\\";\\n $this->bloque=\\\"recibos/registro_generarReciboPago\\\";\\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 \\n //Conexion ORACLE\\n if($this->nivel==51 || $this->nivel==52 ){\\n $this->accesoOracle = $this->conectarDB($configuracion, \\\"estudiante\\\");\\n }elseif($this->nivel==121 ){\\n $this->accesoOracle = $this->conectarDB($configuracion, \\\"egresado\\\");\\n }else{\\n echo \\\"NO TIENE PERMISOS PARA ESTE MODULO\\\";\\n exit;\\n }\\n \\n $cadena_sql=$this->sql->cadena_sql(\\\"periodoActivo\\\",'');\\n $resultado_periodo=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\\\"busqueda\\\" );\\n $this->ano=$resultado_periodo[0]['ANO'];\\n $this->periodo=$resultado_periodo[0]['PERIODO'];\\n ?>\\n
\\n \\n \\n \\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60a7e813ef3103f2f3b9f0efcff5397c\",\n \"score\": \"0.54728913\",\n \"text\": \"protected function caminhaConfigPacote()\\r\\n {\\r\\n //\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff01b34a59da03daf1afbecd68ee850d\",\n \"score\": \"0.5472773\",\n \"text\": \"public function cobertura(){\\r\\n\\t\\tparent::conectaBDMy();\\t \\r\\n\\t\\t$this->idCobertura=\\\"\\\";\\t\\t\\r\\n\\t\\t$this->desc=\\\"\\\";\\r\\n\\t\\t$this->tipo=\\\"\\\";\\t\\r\\n\\t\\t$this->monto=\\\"\\\";\\t\\r\\n\\t\\t$this->fecha_inicio=\\\"\\\";\\t\\r\\n\\t\\t$this->fecha_fin=\\\"\\\";\\t\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"306c2713ff15f4c33c5233af58a2fe2e\",\n \"score\": \"0.5465796\",\n \"text\": \"function __construct() \\r\\n {\\r\\n $this->setPermisos();\\r\\n $this->configuracion=Config::getInstance();\\r\\n // $this->mensaje=\\\"hola mundo\\\";\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a226d3e4079e7c835cb519302e7f7fee\",\n \"score\": \"0.5465111\",\n \"text\": \"function cl_avaliacaogrupoperguntaresposta() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"avaliacaogrupoperguntaresposta\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07a57b7a6033b6f0b28cf53023fe4b55\",\n \"score\": \"0.5457885\",\n \"text\": \"public function procesar_compra( $costo, $cantidad, $forma_pago, $cod_producto ){\\n\\n\\t\\t\\t// ABRO LA CONEXION A LA BASE DE DATOS\\n\\t\\t\\t$con = $this->conexion();\\n\\n\\t\\t\\t// CALCULO DEL TOTAL DE LA COMPRA\\n\\t\\t\\t$total = $costo * $cantidad;\\n\\n\\t\\t\\t// PREPARO EL QUERY DE INSERCION\\n\\t\\t\\t$insert_compra = $con->prepare(\\t\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tINSERT INTO compra( \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfecha_compra, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\thora_compra,\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcod_producto, \\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcosto, \\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcantidad, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttotal, \\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcod_cuenta )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tVALUES( \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tNOW(), \\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tNOW()::TIME(0), \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\".$cod_producto.\\\", \\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\".$costo.\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\".$cantidad.\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\".$total.\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\".$forma_pago.\\\"\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\" );\\n\\n\\t\\t\\t// EJECUTO EL QUERY\\n\\t\\t\\t$insert_compra->execute();\\n\\n\\t\\t\\t// CUENTO Y VERIFICO EL RESULTADO DE LA INSERCION\\n\\t\\t\\t$resultado_insert_compra = $insert_compra->rowCount();\\n\\n\\t\\t\\t// SI LA INSERCION FUE EXITOSA\\n\\t\\t\\tif( $resultado_insert_compra == 1 ){\\n\\t\\t\\t\\n\\n\\t\\t\\t\\t//TRAIGO DE LA BASE DE DATO LA INFORMACION RECIENTEMENTE INSERTADA \\n\\t\\t\\t\\t//PARA GRABAR EL MOVIMIENTO EN LA CUENTA ELEGIDA\\n\\t\\t\\t\\t$consulta_compra = $con->query( \\\"SELECT * FROM compra ORDER BY cod_compra DESC LIMIT 1\\\" );\\n\\t\\t\\t\\t$registro_compra = $consulta_compra->fetch( PDO::FETCH_ASSOC );\\n\\n\\t\\t\\t\\t$insert_movimiento = $con->prepare( \\t\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tINSERT INTO movimiento ( \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfecha_movimiento, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\thora_movimiento, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcaja_fuerte, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcta_cte, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcaja_chica, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttarjeta_disponible, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttarjeta_deuda, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcod_tipo_mov )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tVALUES ( \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'\\\".$registro_compra['fecha_compra'].\\\"', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'\\\".$registro_compra['hora_compra'].\\\"', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:caja_fuerte \\t\\t, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:cta_cte \\t\\t\\t, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t0 \\t\\t\\t\\t\\t, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:tarjeta_disponible , \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:tarjeta_deuda \\t\\t, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t2 )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\");\\n\\n\\t\\t\\t\\t// DE ACUERDO A LA FORMA DE PAGO QUE SE SELECCIONO, SE DEFINE LA CUENTA \\n\\t\\t\\t\\t// QUE VA A SER AFECTADA\\n\\t\\t\\t\\tswitch ( $forma_pago ) {\\n\\t\\t\\t\\t\\tcase 1:\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':caja_fuerte', $total );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':cta_cte', 0 );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':tarjeta_disponible', 0 );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':tarjeta_deuda', 0 );\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\tcase 2:\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':caja_fuerte', 0 );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':cta_cte', $total );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':tarjeta_disponible', 0 );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':tarjeta_deuda', 0 );\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\tcase 3:\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':caja_fuerte', 0 );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':cta_cte', 0 );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':tarjeta_disponible', $total );\\n\\t\\t\\t\\t\\t\\t$insert_movimiento->bindValue( ':tarjeta_deuda', 0 );\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// EJECUTO EL QUERY\\n\\t\\t\\t\\t$insert_movimiento->execute();\\n\\n\\t\\t\\t\\t// CUENTO Y VERIFICO EL RESULTADO DE LA INSERCION\\n\\t\\t\\t\\t$resultado_insert_movimiento = $insert_movimiento->rowCount();\\n\\n\\t\\t\\t\\t// SI SE AFECTO UNA CUENTA CON EXITO\\n\\t\\t\\t\\tif( $resultado_insert_movimiento == 1 ){\\n\\n\\t\\t\\t\\t\\t// TRAIGO DE LA BASE DE DATOS LA INFORMACION DEL MOVIMIENTO INSERTADO\\n\\t\\t\\t\\t\\t$consulta_movimiento = $con->query( \\\"SELECT * FROM movimiento ORDER BY cod_movimiento DESC LIMIT 1\\\" );\\n\\t\\t\\t\\t\\t$registro_movimiento = $consulta_movimiento->fetch( PDO::FETCH_ASSOC );\\n\\n\\t\\t\\t\\t\\t// TRAIGO DE LA BASE DE DATOS EL RESUMEN DE LAS DISTINTAS CUENTAS\\n\\t\\t\\t\\t\\t$consulta_saldos = $con->query( \\\"SELECT * FROM saldos ORDER BY cod_actualizacion DESC LIMIT 1\\\" );\\n\\t\\t\\t\\t\\t$registro_saldos = $consulta_saldos->fetch( PDO::FETCH_ASSOC );\\n\\n\\t\\t\\t\\t\\t// PREPARO EL QUERY PARA MODIFICAR EL SALDO DE LA CUENTA QUE SE AFECTO EN EL MOVIMIENTO\\n\\t\\t\\t\\t\\t$insert_saldo = $con->prepare( \\t\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tINSERT INTO saldos ( \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcod_movimiento,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfecha_saldo, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\thora_saldo, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcaja_fuerte, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcta_cte, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcaja_chica, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttarjeta_disponible, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttarjeta_deuda\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tVALUES ( \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\".$registro_movimiento['cod_movimiento'].\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'\\\".$registro_movimiento['fecha_movimiento'].\\\"', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'\\\".$registro_movimiento['hora_movimiento'].\\\"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:caja_fuerte, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:cta_cte, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'\\\".$registro_saldos['caja_chica'].\\\"', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:tarjeta_disponible, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:tarjeta_deuda\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\");\\n\\n\\t\\t\\t\\t\\t// DE ACUERDO A LA FORMA DE PAGO, SE AFECTARA EL VALOR DE LA CUENTA CORRESPONDIENTE.\\n\\t\\t\\t\\t\\tswitch ( $forma_pago ) {\\n\\t\\t\\t\\t\\t\\tcase 1:\\n\\t\\t\\t\\t\\t\\t\\t$saldo = $registro_saldos['caja_fuerte'] - $total;\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':caja_fuerte', $saldo );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':cta_cte', $registro_saldos['cta_cte'] );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':tarjeta_disponible', $registro_saldos['tarjeta_disponible'] );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':tarjeta_deuda', $registro_saldos['tarjeta_deuda'] );\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\t\\tcase 2:\\n\\t\\t\\t\\t\\t\\t\\t$saldo = $registro_saldos['cta_cte'] - $total;\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':caja_fuerte', $registro_saldos['caja_fuerte'] );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':cta_cte', $saldo );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':tarjeta_disponible', $registro_saldos['tarjeta_disponible'] );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':tarjeta_deuda', $registro_saldos['tarjeta_deuda'] );\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\t\\tcase 3:\\n\\t\\t\\t\\t\\t\\t\\t$saldo_disponible = $registro_saldos['tarjeta_disponible'] - $total;\\n\\t\\t\\t\\t\\t\\t\\t$saldo_deuda = $registro_saldos['tarjeta_disponible'] + $total;\\n\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':caja_fuerte', $registro_saldos['caja_fuerte'] );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':cta_cte', $registro_saldos['cta_cte'] );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':tarjeta_disponible', $saldo_disponible );\\n\\t\\t\\t\\t\\t\\t\\t$insert_saldo->bindValue( ':tarjeta_deuda', $saldo_deuda );\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// SE EJECUTA EL QUERY\\n\\t\\t\\t\\t\\t$insert_saldo->execute();\\n\\n\\t\\t\\t\\t\\t// CUENTO Y VERIFICO QUE LA INSERCION HAYA SIDO EXITOSA\\n\\t\\t\\t\\t\\t$resultado_insert_saldos = $insert_saldo->rowCount();\\n\\n\\t\\t\\t\\t\\t// SI SE MODIFICO EL SALDO EXITOSAMENTE\\n\\t\\t\\t\\t\\tif( $resultado_insert_saldos == 1 ){\\n\\n\\t\\t\\t\\t\\t\\t// &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\\n\\t\\t\\t\\t\\t\\t// TENGO QUE AUMENTAR EL STOCK DEL PRODUCTO EN LA CANTIDAD COMPRADA\\n\\t\\t\\t\\t\\t\\t// &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t// TRAIGO DE LA BASE DE DATOS EL VALOR DE STOCK ACTUAL DEL PRODUCTO\\n\\t\\t\\t\\t\\t\\t$consulta_stock = $con->prepare( \\\"SELECT stock_actual FROM producto WHERE cod_producto = ?\\\" );\\n\\t\\t\\t\\t\\t\\t$consulta_stock->bindvalue( 1, $cod_producto );\\n\\t\\t\\t\\t\\t\\t$consulta_stock->execute();\\n\\t\\t\\t\\t\\t\\t$stock_producto = $consulta_stock->fetch( PDO::FETCH_ASSOC );\\n\\t\\t\\t\\t\\t\\t$stock_actualizado = $stock_producto['stock_actual'] + $cantidad;\\n\\n\\t\\t\\t\\t\\t\\t$update_stock = $con->prepare( \\\"UPDATE producto SET stock_actual = ? WHERE cod_producto = ?\\\" );\\n\\t\\t\\t\\t\\t\\t$update_stock->bindvalue( 1, $stock_actualizado );\\n\\t\\t\\t\\t\\t\\t$update_stock->bindvalue( 2, $cod_producto );\\n\\t\\t\\t\\t\\t\\t$update_stock->execute();\\n\\n\\t\\t\\t\\t\\t\\t$resultado_update_stock = $update_stock->rowCount();\\n\\n\\t\\t\\t\\t\\t\\tif( $resultado_update_stock == 1 ){\\n\\t\\t\\t\\t\\t\\t\\treturn \\\"La compra ha sido procesada exitosamente!\\\";\\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 \"title\": \"\"\n },\n {\n \"docid\": \"79775790a4b6764a2144303e178e49ae\",\n \"score\": \"0.5455694\",\n \"text\": \"function activar_modificacion_clave()\\n\\t{\\n\\t\\t$this->_flag_modificacion_clave = true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3041c03bfa72a238ef6c81e30de50a63\",\n \"score\": \"0.54555297\",\n \"text\": \"public function __construct()\\n {\\n //print_r($this->getUrl());\\n $url = $this->getUrl();\\n //eval si el archivo cargado existe en path\\n if(file_exists('../app/controladores/*'.ucwords($url[0]).'.php'))\\n {\\n //si existe el arhcivo se establece como controlador por default\\n $this->controladorActual=ucwords($url[0]); //en el idx 0 esta el controlador\\n\\n //unset para el url[0] controlador\\n unset($url[0]);\\n }\\n //inclur controlador\\n require_once '../app/controladores/'.$this->controladorActual.'.php';\\n //\\n $this->controladorActual= new $this->controladorActual;\\n\\n ///segunda parte del array $url[1] idx 1 es el METODO o ACCION del controlador\\n if(isset($url[1]))//tiene algo la seccion accion\\n { //lo extraemos\\n if(method_exists($this->controladorActual, $url[1]))\\n {\\n //verificamos cual es\\n $this->metodoActual = $url[1];\\n //unset para el url[1] accion del controlador\\n unset($url[1]);\\n //echo $this->metodoActual;\\n }\\n }//isset GET 1 accion del controlador\\n //OBTENER LOS POSIBLES PAR´AMETROS\\n $this->parametros = $url ? array_values($url) : [];\\n //llamar callback con parametros array\\n call_user_func_array([$this->controladorActual, $this->metodoActual], $this->parametros);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef683f9d7d69d7f29469e759e40e18ae\",\n \"score\": \"0.54554796\",\n \"text\": \"public function crear(){\\n\\t\\t$this->location = \\\"promociones\\\";\\n\\t\\t$this->include_theme(\\\"index\\\",\\\"crear\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ebf27cb318fd78c781b8993ba28e177\",\n \"score\": \"0.5445079\",\n \"text\": \"function cl_empautitempcprocitem() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"empautitempcprocitem\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cc9bbc52bd7079bd49fb6d917fa3af9\",\n \"score\": \"0.5443557\",\n \"text\": \"function insertarProcesoCaja(){\\n\\t\\t$this->procedimiento='tes.ft_proceso_caja_ime';\\n\\t\\t$this->transaccion='TES_REN_INS';\\n\\t\\t$this->tipo_procedimiento='IME';\\n\\n\\t\\t//Define los parametros para la funcion\\n\\t\\t$this->setParametro('estado','estado','varchar');\\n\\t\\t$this->setParametro('id_comprobante_diario','id_comprobante_diario','int4');\\n\\t\\t$this->setParametro('nro_tramite','nro_tramite','varchar');\\n\\t\\t$this->setParametro('tipo','tipo','varchar');\\n\\t\\t$this->setParametro('motivo','motivo','text');\\n\\t\\t$this->setParametro('estado_reg','estado_reg','varchar');\\n\\t\\t$this->setParametro('fecha_fin','fecha_fin','date');\\n\\t\\t$this->setParametro('id_caja','id_caja','int4');\\n\\t\\t$this->setParametro('fecha','fecha','date');\\n\\t\\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\n\\t\\t$this->setParametro('monto','monto','numeric');\\n\\t\\t$this->setParametro('id_comprobante_pago','id_comprobante_pago','int4');\\n\\t\\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\\n\\t\\t$this->setParametro('fecha_inicio','fecha_inicio','date');\\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\": \"30afe9ab3a3f5bb408872d53ba52accb\",\n \"score\": \"0.5442408\",\n \"text\": \"function aplicarReglamento($proyecto,$anio,$periodo){\\n ?> \\n \\n
\\n \\n \\n \\n
\\n\\t\\t\\n\\t\\t$valida = $this->validaCalendario();\\n\\t\\t\\n\\t\\tif(!$valida){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\t\\n\\t\\t$this->proyecto=$proyecto;\\n $datosProyecto=$this->consultarTipoProyecto();\\n $this->tipoProyecto=$datosProyecto[0]['TIPO'];\\n $this->nivelProyecto=$datosProyecto[0]['NIVEL'];\\n\\t\\t$this->anio=$anio;\\n\\t\\t$this->periodo=$periodo;\\n //Si el proyecto es un posgrado no aplica reglamento\\n if (trim($this->nivelProyecto)!='PREGRADO')\\n {\\n //inserta el evento de inicio\\n $this->insertarInicioEvento(73,$this->tipoProyecto);\\n //actualiza la fecha de fin del evento\\n $this->insertarFinEvento(73);\\n //vuelve al formulario de cierre\\n $this->volverFormularioCierre();\\n exit;\\n }\\n\\t\\t$this->insertarInicioEvento(73,$this->tipoProyecto);\\n\\t\\t//consulta los estudiantes que se encuentran registrados en la tabla de reglamento del proyecto\\n \\t$estudiantes=$this->consultarEstudiantesReglamento();\\n\\t\\t//consulta todos los estudiantes en prueba para periodos anteriores\\n\\t\\t$estudiantesPrueba=$this->consultarEstudiantesPrueba();\\n //crea un arreglo de estudiantes que han estado en prueba indicando el motivo\\n\\t\\t$this->estudiantesPrueba=$this->organizarEstudiantesPrueba($estudiantesPrueba);\\n //consulta las notas perdidas de los estudiantes en la tabla de reglamento\\n $this->notasPerdidas=$this->consultarNotasPerdidas();\\n\\t\\t//Genera arreglo de notas perdidas organizado por estudiante, espacio, ano y periodo\\n if (is_array($this->notasPerdidas)&&!empty($this->notasPerdidas))\\n {\\n $this->organizarNotasPorEstudiante();\\n }\\n\\t\\t//ejecuta proceso por cada estudiante\\n $a=0;\\n\\t\\tif(!is_array($estudiantes))\\n {\\n $this->error[]=\\\"No hay estudiantes para procesar\\\";\\n //return false;\\t\\t\\t\\n\\t\\t}else\\n {\\n $numRegistros=count($estudiantes);\\n\\t\\t\\tforeach($estudiantes as $clave=>$valor)\\n {\\n\\n $porcentaje = $a * 100 / $numRegistros; //saco mi valor en porcentaje\\n echo \\\"\\\"; //llamo a la función JS(JavaScript) para actualizar el progreso\\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\\n ob_flush();\\n $a++;\\n usleep (300); \\n $this->procesarEstudiante($valor);\\n\\t\\t\\t}\\t\\n }\\n\\t\\t//actualiza la fecha de fin del evento\\n\\t\\t$this->insertarFinEvento(73);\\n //vuelve al formulario de cierre\\n $this->volverFormularioCierre();\\n\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8450280bee9ac75fd7aec306f4297f46\",\n \"score\": \"0.5441922\",\n \"text\": \"function cl_constrescr() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"constrescr\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6aeffe433faa1826f8a0066037b079d\",\n \"score\": \"0.5437066\",\n \"text\": \"function crearComercio($p){\\n // creo comercio\\n $c = R::dispense(\\\"comercios\\\");\\n $c[\\\"cuit\\\"] = $p[\\\"cuit\\\"];\\n $c[\\\"razon_social\\\"] = $p[\\\"razon_social\\\"];\\n $c[\\\"nombre\\\"] = $p[\\\"nombre\\\"];\\n $c[\\\"dni_titular\\\"] = $p[\\\"dni_titular\\\"];\\n $c[\\\"nombre_titular\\\"] = $p[\\\"nombre_titular\\\"];\\n $c[\\\"mail\\\"] = $p[\\\"mail\\\"];\\n $c[\\\"telefono_fijo\\\"] = $p[\\\"telefono_fijo\\\"];\\n $c[\\\"telefono_celular\\\"] = $p[\\\"telefono_celular\\\"];\\n // [comercio]\\n $c[\\\"domicilio_comercio_calle\\\"] = $p[\\\"domicilio_comercio_calle\\\"];\\n $c[\\\"domicilio_comercio_altura\\\"] = $p[\\\"domicilio_comercio_altura\\\"];\\n $c[\\\"domicilio_comercio_observacion\\\"] = $p[\\\"domicilio_comercio_observacion\\\"];\\n $c[\\\"domicilio_comercio_cpa\\\"] = $p[\\\"domicilio_comercio_cpa\\\"];\\n $c[\\\"domicilio_comercio_provincia\\\"] = $p[\\\"domicilio_comercio_provincia\\\"];\\n $c[\\\"domicilio_comercio_localidad\\\"] = $p[\\\"domicilio_comercio_localidad\\\"];\\n // [legal]\\n $c[\\\"domicilio_legal_calle\\\"] = $p[\\\"domicilio_legal_calle\\\"];\\n $c[\\\"domicilio_legal_altura\\\"] = $p[\\\"domicilio_legal_altura\\\"];\\n $c[\\\"domicilio_legal_observacion\\\"] = $p[\\\"domicilio_legal_observacion\\\"];\\n $c[\\\"domicilio_legal_cpa\\\"] = $p[\\\"domicilio_legal_cpa\\\"];\\n $c[\\\"domicilio_legal_provincia\\\"] = $p[\\\"domicilio_legal_provincia\\\"];\\n $c[\\\"domicilio_legal_localidad\\\"] = $p[\\\"domicilio_legal_localidad\\\"];\\n // [real]\\n $c[\\\"domicilio_real_calle\\\"] = $p[\\\"domicilio_real_calle\\\"];\\n $c[\\\"domicilio_real_altura\\\"] = $p[\\\"domicilio_real_altura\\\"];\\n $c[\\\"domicilio_real_observacion\\\"] = $p[\\\"domicilio_real_observacion\\\"];\\n $c[\\\"domicilio_real_cpa\\\"] = $p[\\\"domicilio_real_cpa\\\"];\\n $c[\\\"domicilio_real_provincia\\\"] = $p[\\\"domicilio_real_provincia\\\"];\\n $c[\\\"domicilio_real_localidad\\\"] = $p[\\\"domicilio_real_localidad\\\"];\\n // [/domicilio]\\n $c[\\\"observacion\\\"] = $p[\\\"observacion\\\"];\\n $c[\\\"rubro\\\"] = $p[\\\"rubro\\\"];\\n $c[\\\"convenio\\\"] = $p[\\\"convenio\\\"];\\n $c[\\\"fecha_alta\\\"] = date(\\\"Ymd\\\");\\n $c[\\\"estado\\\"] = true;\\n $id_comercio = R::store($c);\\n // creo usuario\\n $u = R::dispense(\\\"user\\\");\\n $u[\\\"user\\\"] = $p[\\\"user\\\"];\\n $u[\\\"pass\\\"] = md5($p[\\\"pass\\\"]);\\n $u[\\\"level\\\"] = 3; // ESTO DEBERIA ESTAR EN LA BD, QUIENES SON COMERCIO; y FINANCIERA\\n $u[\\\"titular\\\"] = $p[\\\"nombre_titular\\\"];\\n $u[\\\"dni\\\"] = $p[\\\"dni_titular\\\"];\\n $u[\\\"id_comercio\\\"] = $id_comercio;\\n R::store($u);\\n response(200,\\\"comercio creado exitosamente\\\",[\\\"exito\\\" => true, \\\"id\\\" => $id_comercio, \\\"ret\\\" => $p]);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4cc93e428a6a2b21d3b7bf4aa4aca55\",\n \"score\": \"0.54362017\",\n \"text\": \"function cl_arrepaga() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"arrepaga\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"682d2e85081083b10a5485407598d3a9\",\n \"score\": \"0.54327935\",\n \"text\": \"function __construct(\\n $codUsrMod,\\n $p_apellido,\\n $s_apellido = 'default',\\n $p_nombre,\\n $s_nombre = 'default',\\n $nacionalidad,\\n $cedula,\\n $telefono = 'default',\\n $telefonoOtro = 'default',\\n $fecNac = 'default',\\n $lugNac = 'default',\\n $email = 'default',\\n $sexo,\\n $relacion,\\n $viveConAlumno,\\n $nivelInstruccion,\\n $profesion = 'default',\\n $telefonoTrabajo = 'default',\\n $direccionTrabajo = 'default',\\n $lugarTrabajo = 'default'\\n ){\\n $conexion = conexion();//desde master.php > conexion.php\\n $this->codUsrMod = mysqli_escape_string($conexion, trim($codUsrMod));\\n $this->p_apellido = mysqli_escape_string($conexion, trim($p_apellido));\\n $this->s_apellido = mysqli_escape_string($conexion, trim($s_apellido));\\n $this->p_nombre = mysqli_escape_string($conexion, trim($p_nombre));\\n $this->s_nombre = mysqli_escape_string($conexion, trim($s_nombre));\\n $this->nacionalidad = mysqli_escape_string($conexion, trim($nacionalidad));\\n $this->cedula = mysqli_escape_string($conexion, trim($cedula));\\n $this->telefono = mysqli_escape_string($conexion, trim($telefono));\\n $this->telefonoOtro = mysqli_escape_string($conexion, trim($telefonoOtro));\\n $this->fecNac = mysqli_escape_string($conexion, trim($fecNac));\\n $this->lugNac = mysqli_escape_string($conexion, trim($lugNac));\\n $this->email = mysqli_escape_string($conexion, trim($email));\\n $this->sexo = mysqli_escape_string($conexion, trim($sexo));\\n $this->relacion = mysqli_escape_string($conexion, trim($relacion));\\n $this->viveConAlumno = mysqli_escape_string($conexion, trim($viveConAlumno));\\n $this->nivelInstruccion = mysqli_escape_string($conexion, trim($nivelInstruccion));\\n $this->profesion = mysqli_escape_string($conexion, trim($profesion));\\n $this->telefonoTrabajo = mysqli_escape_string($conexion, trim($telefonoTrabajo));\\n $this->direccionTrabajo = mysqli_escape_string($conexion, trim($direccionTrabajo));\\n $this->lugarTrabajo = mysqli_escape_string($conexion, trim($lugarTrabajo));\\n //metodos internos:\\n self::setNull();\\n self::chequeaForma();\\n self::chequeame();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf73e3d4a58194cf1e942b9a63e8a8a6\",\n \"score\": \"0.5425714\",\n \"text\": \"function cl_especmedico() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"especmedico\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66fe7caf7bc7b316c20aacfeb71ea1d6\",\n \"score\": \"0.54213274\",\n \"text\": \"public function cargarPromociones(){\\n\\t\\t$promociones = new promocion();\\n\\t\\t$promociones->search_clause = '1';\\n\\t\\t$this->promociones = $promociones->read('id,nombre,imagen,fecha_limite');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d9731ec653a5cc8c7d821efcebf5e97\",\n \"score\": \"0.5420778\",\n \"text\": \"function genera_correlativo($Codigo_Cliente)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t\\t$Condicion = 'and codigo_cliente = \\\"'.$Codigo_Cliente.'\\\"';\\r\\n\\t\\tif('cli' == $this->session->userdata('tipo_grupo'))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$Condicion = '';\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t//Se genera la consulta.\\r\\n\\t\\t$Consulta = '\\r\\n\\t\\t\\tSELECT proceso\\r\\n\\t\\t\\tFROM procesos proc, cliente clie\\r\\n\\t\\t\\tWHERE proc.id_cliente = clie.id_cliente\\r\\n\\t\\t\\t'.$Condicion.'\\r\\n\\t\\t\\tand id_grupo = \\\"'.$this->session->userdata('id_grupo').'\\\"\\r\\n\\t\\t\\torder by proceso+0 desc limit 0, 1\\r\\n\\t\\t';\\r\\n\\t\\t\\r\\n\\t\\t//Ejecuto la consulta\\r\\n\\t\\t$Resultado = $this->db->query($Consulta);\\r\\n\\t\\t\\r\\n\\t\\t//Verificamos si se encontraron numeros de procesos anteriores.\\r\\n\\t\\tif($Resultado->num_rows() > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\t$Proceso = $Resultado->row_array();\\r\\n\\t\\t\\techo $Proceso['proceso'] + 1;\\r\\n\\t\\t}\\r\\n\\t\\telse{\\r\\n\\t\\t\\techo \\\"1\\\";\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa2d0b2ce846fccfd946d056342650a3\",\n \"score\": \"0.5412534\",\n \"text\": \"function cl_liclicitaevento() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"liclicitaevento\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6788488adfa52aa9afa2c190a88a9738\",\n \"score\": \"0.5411518\",\n \"text\": \"function Cargar_precios($id, $acuerdo, $filadesde, $buscar_temporada, $buscar_habitacion, $buscar_caracteristica){\\r\\n\\r\\n\\t\\t$conexion = $this ->Conexion;\\r\\n\\t\\t$Usuario = $this ->Usuario;\\r\\n\\t\\t\\t\\r\\n\\t\\tif($buscar_temporada != null){\\r\\n\\t\\t\\t$habit = \\\" AND HABITACION = '\\\".$buscar_habitacion.\\\"'\\\";\\r\\n\\t\\t\\t$carac = \\\" AND CARACTERISTICA = '\\\".$buscar_caracteristica.\\\"'\\\";\\r\\n\\t\\t\\t$CADENA_BUSCAR = \\\" WHERE ID = '\\\".$id.\\\"' AND ACUERDO = \\\".$acuerdo.\\\" AND TEMPORADA = '\\\".$buscar_temporada.\\\"'\\\";\\r\\n\\t\\t\\tif($buscar_habitacion != null){\\r\\n\\t\\t\\t\\t$CADENA_BUSCAR .= $habit;\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif($buscar_caracteristica != null){\\r\\n\\t\\t\\t\\t$CADENA_BUSCAR .= $carac;\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t}elseif($buscar_habitacion){\\r\\n\\t\\t\\t$carac = \\\" AND CARACTERISTICA = '\\\".$buscar_caracteristica.\\\"'\\\";\\r\\n\\t\\t\\t$CADENA_BUSCAR = \\\" WHERE ID = '\\\".$id.\\\"' AND ACUERDO = \\\".$acuerdo.\\\" AND HABITACION = '\\\".$buscar_habitacion.\\\"'\\\";\\r\\n\\t\\t\\tif($buscar_caracteristica != null){\\r\\n\\t\\t\\t\\t\\t$CADENA_BUSCAR .= $carac;\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t}elseif($buscar_caracteristica){\\r\\n\\t\\t\\t$CADENA_BUSCAR = \\\" WHERE ID = '\\\".$id.\\\"' AND ACUERDO = \\\".$acuerdo.\\\" AND CARACTERISTICA = '\\\".$buscar_caracteristica.\\\"'\\\";\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t$CADENA_BUSCAR = \\\" WHERE ID = '\\\".$id.\\\"' AND ACUERDO = '\\\".$acuerdo.\\\"'\\\"; \\r\\n \\t\\t}\\r\\n\\r\\n\\t\\t$resultado =$conexion->query(\\\"SELECT temporada temporada_prec, habitacion, caracteristica, uso, coste_pax, coste_habitacion, calculo, porcentaje_neto, neto_pax, neto_habitacion, porcentaje_com, pvp_pax, pvp_habitacion FROM hit_alojamientos_precios \\\".$CADENA_BUSCAR.\\\" ORDER BY temporada, uso\\\");\\r\\n\\r\\n\\t\\tif ($resultado == FALSE){\\r\\n\\t\\t\\techo('Error en la consulta: '.$CADENA_BUSCAR);\\r\\n\\t\\t\\t$resultado->close();\\r\\n\\t\\t\\t$conexion->close();\\r\\n\\t\\t\\texit;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t//Guardamos el resultado en una matriz con un numero fijo de registros\\r\\n\\t\\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\\r\\n\\t\\t$numero_filas =$conexion->query(\\\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'ALOJAMIENTOS_PRECIOS' AND USUARIO = '\\\".$Usuario.\\\"'\\\");\\r\\n\\t\\t$Nfilas\\t = $numero_filas->fetch_assoc();\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t //------\\r\\n\\r\\n\\t\\t$precios = array();\\r\\n\\t\\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\\r\\n\\t\\t\\t$resultado->data_seek($num_fila);\\r\\n\\t\\t\\t$fila = $resultado->fetch_assoc();\\r\\n\\t\\t\\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\\r\\n\\t\\t\\tif($fila['temporada_prec'] == ''){\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarray_push($precios,$fila);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t//Liberar Memoria usada por la consulta\\r\\n\\t\\t$resultado->close();\\r\\n\\t\\t$numero_filas->close();\\r\\n\\r\\n\\t\\treturn $precios;\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c671244e0f7de9d642ef6b221231efae\",\n \"score\": \"0.54110897\",\n \"text\": \"function cl_empagemovformapagamento() {\\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"empagemovformapagamento\\\");\\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"439267ab4b675a0574f324a99d532fc0\",\n \"score\": \"0.5410127\",\n \"text\": \"function __construct(){\\n\\t\\t$this->anio = date(\\\"Y\\\");\\n if($_SESSION[\\\"pensum\\\"] == \\\"\\\") {\\n require_once(\\\"ClsPensum.php\\\");\\n $ClsPen = new ClsPensum();\\n $this->pensum = $ClsPen->get_pensum_activo();\\n }else{\\n $this->pensum = $_SESSION[\\\"pensum\\\"];\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"824ae06a078c30c5a6d8a298441eb5f2\",\n \"score\": \"0.5410074\",\n \"text\": \"public function Opciones() {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16dfc10dc59c06b5e77b94a35e1a26ef\",\n \"score\": \"0.5409521\",\n \"text\": \"public function crearFinca()\\n {\\n $this->validarSesion();\\n $this->vista(\\\"crearfinca/crearfinca\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46300bb2f3f5588d355d0066c4401192\",\n \"score\": \"0.54076815\",\n \"text\": \"public function initPioche(){\\n $this->pioche = $this->getDeck()->getCartes();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"256bef1ba0d79aced6e989a63d0e1e7b\",\n \"score\": \"0.5404904\",\n \"text\": \"function reporteCabeceraProcesoCaja(){\\n\\t\\t$this->procedimiento='tes.ft_proceso_caja_sel';\\n\\t\\t$this->transaccion='TES_REPCCAJA_SEL';\\n\\t\\t$this->tipo_procedimiento='SEL';//tipo de transaccion\\n\\t\\t$this->setCount(false);\\n\\n\\t\\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\n\\n\\t\\t$this->captura('id_cuenta_doc','INTEGER');\\n\\t\\t$this->captura('id_tipo_cuenta_doc','INTEGER');\\n\\t\\t$this->captura('id_proceso_wf','INTEGER');\\n\\t\\t$this->captura('id_caja','INTEGER');\\n\\t\\t$this->captura('nombre_cheque','VARCHAR');\\n\\t\\t$this->captura('id_uo','INTEGER');\\n\\t\\t$this->captura('id_funcionario','INTEGER');\\n\\t\\t$this->captura('tipo_pago','VARCHAR');\\n\\t\\t$this->captura('id_depto','INTEGER');\\n\\t\\t$this->captura('id_cuenta_doc_fk','INTEGER');\\n\\t\\t$this->captura('nro_tramite','VARCHAR');\\n\\t\\t$this->captura('motivo','VARCHAR');\\n\\t\\t$this->captura('fecha','DATE');\\n\\t\\t$this->captura('id_moneda','INTEGER');\\n\\t\\t$this->captura('estado','VARCHAR');\\n\\t\\t$this->captura('estado_reg','VARCHAR');\\n\\t\\t$this->captura('id_estado_wf','INTEGER');\\n\\t\\t$this->captura('id_usuario_ai','INTEGER');\\n\\t\\t$this->captura('usuario_ai','VARCHAR');\\n\\t\\t$this->captura('fecha_reg','TIMESTAMP');\\n\\t\\t$this->captura('id_usuario_reg','INTEGER');\\n\\t\\t$this->captura('fecha_mod','TIMESTAMP');\\n\\t\\t$this->captura('id_usuario_mod','INTEGER');\\n\\t\\t$this->captura('usr_reg','VARCHAR');\\n\\t\\t$this->captura('usr_mod','VARCHAR');\\n\\t\\t$this->captura('desc_moneda','VARCHAR');\\n\\t\\t$this->captura('desc_depto','VARCHAR');\\n\\t\\t$this->captura('obs','TEXT');\\n\\t\\t$this->captura('desc_funcionario','TEXT');\\n\\t\\t$this->captura('importe','numeric');\\n\\t\\t$this->captura('desc_funcionario_cuenta_bancaria','varchar');\\n\\t\\t$this->captura('id_funcionario_cuenta_bancaria','integer');\\n\\t\\t$this->captura('id_depto_lb','integer');\\n\\t\\t$this->captura('id_depto_conta','integer');\\n\\t\\t$this->captura('desc_tipo_cuenta_doc','VARCHAR');\\n\\t\\t$this->captura('sw_solicitud','VARCHAR');\\n\\t\\t$this->captura('lugar','VARCHAR');\\n\\t\\t$this->captura('cargo_funcionario','varchar');\\n\\t\\t$this->captura('nombre_unidad','VARCHAR');\\n\\t\\t$this->captura('importe_literal','VARCHAR');\\n\\t\\t$this->captura('motivo_ori','VARCHAR');\\n\\t\\t$this->captura('gerente_financiero','VARCHAR');\\n\\t\\t$this->captura('cargo_gerente_financiero','VARCHAR');\\n\\n\\t\\t$this->captura('aprobador','TEXT');\\n\\t\\t$this->captura('cargo_aprobador','TEXT');\\n\\n\\t\\t$this->captura('nro_cbte','VARCHAR');\\n\\t\\t$this->captura('num_memo','VARCHAR');\\n\\t\\t$this->captura('num_rendicion','VARCHAR');\\n\\t\\t$this->captura('nro_cheque','integer');\\n\\t\\t$this->captura('importe_solicitado','numeric');\\n\\n\\t\\t//Ejecuta la instruccion\\n\\t\\t$this->armarConsulta();\\n\\t\\t$this->ejecutarConsulta();\\n\\t\\t//Devuelve la respuesta\\n\\t\\treturn $this->respuesta;\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":574,"cells":{"query_id":{"kind":"string","value":"0ac7bdb02e5fbb03eb7a9ee5316bf396"},"query":{"kind":"string","value":"Run the database seeds."},"positive_passages":{"kind":"list like","value":[{"docid":"1537a8ad1aa3a1d33777e5358913e520","score":"0.0","text":"public function run()\n {\n for ($i=1; $i <= 1000; $i++) {\n\n $task = new Task;\n $task->title = \"Task $i\";\n\n $faker = Faker::create();\n // $task->description = $faker->realText(200, 2);\n $task->description = $faker->text(100);\n\n $task->save();\n\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"1537a8ad1aa3a1d33777e5358913e520\",\n \"score\": \"0.0\",\n \"text\": \"public function run()\\n {\\n for ($i=1; $i <= 1000; $i++) {\\n\\n $task = new Task;\\n $task->title = \\\"Task $i\\\";\\n\\n $faker = Faker::create();\\n // $task->description = $faker->realText(200, 2);\\n $task->description = $faker->text(100);\\n\\n $task->save();\\n\\n }\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"5276fa926c7c0e25eef6eaa079aab740","score":"0.8033761","text":"public function run()\n\t{\n\t\t// $this->call('UsersTableSeeder');\n\n\t\t// Truncamos los datos de los modelos y insertamos de nuevo en cada seed\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\tEstudiante::truncate();\n\t\tCurso::truncate();\n\t\tProfesor::truncate();\n\t\tDB::table('curso_estudiante')->truncate();\n\n\t\tfactory(Profesor::class, 50)->create();\n\t\tfactory(App\\Profesor::class)->create([\n 'nombre' => 'Heisenberg',\n 'email' => 'heisenberg@breakingbad.com',\n 'password' => password_hash('pass', PASSWORD_BCRYPT)\n ]);\n\t\tfactory(Estudiante::class, 500)->create();\n\n\t\tfactory(Curso::class, 40)\n\t\t\t->create()\n\t\t\t->each(function($curso){\n\t\t\t\t$curso\n\t\t\t\t\t->estudiantes()\n\t\t\t\t\t->attach( array_rand(range(1, 500), 40) );\n\t\t\t});\n\n\t}","title":""},{"docid":"0269eae890ef3ba6d0757e56d65e0856","score":"0.8006915","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(App\\Category::class, 25)->create();\n foreach ($categories as $category) {\n $products = factory(App\\Product::class, random_int(1, 50))->create(['category_id' => $category->id]);\n foreach ($products as $product) {\n factory(App\\Variant::class, random_int(0, 50))->create(['product_id' => $product->id]);\n }\n }\n }","title":""},{"docid":"8aa803bb2ba2d917839552e0913e299d","score":"0.8006357","text":"public function run()\n {\n\n $faker = Faker::create();\n\n foreach (range(1,100) as $index) {\n \tApp\\Model\\Author::create([\n \t\t'name' => $faker->name,\n \t]);\n }\n\n \tforeach (range(1,100) as $index) {\n \tApp\\Model\\Publisher::create([\n \t\t'name' => $faker->company,\n \t]);\n }\n\n $authors = Author::where('id', '>', 0)->pluck('id')->toArray();\n $publishers = Publisher::where('id', '>', 0)->pluck('id')->toArray();\n\n foreach (range(1,100) as $index) {\n \t\t\tApp\\Model\\Book::create([\n \t\t'ISBN' => $faker->ean13,\n \t\t'title' => $faker->name,\n \t\t'date' => $faker->date,\n \t\t'author_id' => $faker->randomElement($authors),\n \t\t\t'publisher_id' => $faker->randomElement($publishers), \t\t\n \t]);\n }\n }","title":""},{"docid":"e039b35d9c938323e41faa91de018499","score":"0.8004494","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'Harry Potter',\n 'cover'=> 'http://bookriotcom.c.presscdn.com/wp-content/uploads/2014/08/HP_pb_new_1.jpg'\n ]);\n\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'Kamasutra',\n 'cover'=> 'https://img1.od-cdn.com/ImageType-400/3363-1/AB1/79E/D3/%7BAB179ED3-D42C-4135-9102-875ABA350C0E%7DImg400.jpg'\n ]);\n\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'THUG kitchen',\n ]);\n\n Author::create([\n 'name'=> 'Testing Author',\n 'year_of_birth'=> '1972',\n ]);\n\n User::create([\n 'name'=>'Matej',\n 'email'=>'matpolak@seznam.cz',\n 'password'=> '$2y$10$ApgqGBJE9dnxIyqa/Csb0.UntecIvpr08K78KvMEN497F25wde1D2'\n ]);\n }","title":""},{"docid":"c84c48444e4e3992123a987e00590d97","score":"0.7986877","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('secret'),\n 'is_admin' => true,\n 'status' => true,\n 'reputation'=> '100'\n ]);\n\n User::create([\n 'name' => 'Demo User',\n 'email' => 'demo@user.com',\n 'password' => bcrypt('secret'),\n 'is_admin' => false,\n 'status' => true,\n 'reputation'=> '10'\n ]);\n\n factory(App\\Model\\Question::class, 100)->create();\n factory(App\\Model\\Answer::class, 250)->create();\n factory(App\\Model\\Tag::class, 50)->create();\n factory(App\\Model\\Comment::class, 50)->create();\n }","title":""},{"docid":"09eb34b0e1c7c9b0454596554413da5b","score":"0.7947502","text":"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@gmail.com',\n 'password' => Hash::make('123'),\n ]);\n\n $faker = Faker::create('lt_LT'); //statinis metodas\n $authors=10;\n $publishers=10;\n\n foreach(range(1, $authors) as $_) {\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName()\n ]);\n }\n\n foreach(range(1, $publishers) as $_) {\n DB::table('publishers')->insert([\n 'title' => $faker->company(),\n ]);\n }\n\n foreach(range(1, 100) as $_) {\n DB::table('books')->insert([\n 'title' => str_replace(['.', '\"', \"'\", ')', '(' ], '', $faker->realText(rand(10, 30))),\n 'isbn' => $faker->isbn13(),\n 'pages' => rand(22, 550),\n 'about' => $faker->realText(500, 4),\n 'author_id' => rand(1, $authors),\n 'publisher_id' => rand(1, $publishers),\n ]);\n }\n\n }","title":""},{"docid":"99b2d608440f609ad0ec4b7fe078bfbe","score":"0.79405534","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Article::class, 5)->create();\n DB::table('articles')->insert([\n 'name' => 'Ami N.O.',\n 'description' => 'BCAA for enhanced working out',\n 'provider' => 'Optimum Nutrition',\n 'rating' => 4.2,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Quadra Lean',\n 'description' => 'Weight management ',\n 'provider' => 'RSP Nutrition',\n 'rating' => 4.6,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Combat Whey',\n 'description' => 'Whey Protein for muscle building',\n 'provider' => 'MusclePharm',\n 'rating' => 4.3,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Amino Lean',\n 'description' => 'Weight management ',\n 'provider' => 'RSP Nutrition',\n 'rating' => 4.6,\n ]);\n }","title":""},{"docid":"b353a26c6a30fe5cf356c5d5581c8672","score":"0.7884981","text":"public function run()\n {\n //$this->call(UserSeeder::class);\n DB::table('users')->insert([\n 'name' => \"teste\",\n 'email' => \"teste@gmail.com\",\n 'password' => Hash::make('123456'),\n ]);\n\n DB::table('states')->insert([\n 'nome' => \"ativo\",\n 'states_id' => 1,\n ]);\n\n DB::table('states')->insert([\n 'nome' => \"baixado\",\n 'states_id' => 2,\n ]);\n\n DB::table('produtos')->insert([\n\n 'states_id'=>1,\n 'nome'=> \"teste\",\n 'sku'=> 43,\n 'quantidade'=> 200,\n 'descricao'=>\"testando\"\n ]);\n \n DB::table('produtos')->insert([\n 'states_id'=>2,\n 'nome'=> \"teste2\",\n 'sku'=> 44,\n 'quantidade'=> 400,\n 'descricao'=>\"testando2\"\n ]);\n\n\n }","title":""},{"docid":"be8184a1d867e9407161f68458384472","score":"0.7878122","text":"public function run()\n {\n // Truncate our existing records to start from scratch.\n Participant::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Participant::create([\n 'name' => $faker->name,\n 'age' => $faker->numberBetween(1,99),\n 'dob' => now(),\n 'profession' => $faker->randomElement($array = array ('Employed','Student')),\n 'locality' => $faker->city,\n 'no_of_guests' => $faker->numberBetween(0,2),\n 'address' => $faker->address\n ]);\n }\n\n }","title":""},{"docid":"c49c4c393bd62d7155e7274754b4a404","score":"0.78720385","text":"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Martijn Brands',\n 'email' => 'martijn@portfolio.nl',\n 'password' => bcrypt('4&Q5Vhgh6H6+c_=%')\n ]);\n\n \t$faker = Faker\\Factory::create();\n \tfor ($i=0; $i < 10; $i++) {\n\n $title = $faker->sentence;\n\n DB::table('posts')->insert([\n 'title' => $title,\n 'description' => $faker->text($maxNbChars = 600),\n 'color' => $faker->hexcolor,\n 'textColor' => $faker->hexcolor,\n 'slug' => str_slug($title)\n ]);\n }\t\n\t \n }","title":""},{"docid":"58993d8340037bf0991b33dfd6a9f8a3","score":"0.7869335","text":"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Review::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($j=0; $j < 10; $j++) { \n for ($i = 1; $i < 6; $i++) {\n Review::create([\n 'score' => $faker->numberBetween(1,5),\n 'buyer_id' => $i,\n 'seller_id' => $i+6,\n 'ad_id' => $faker->numberBetween(0,10),\n ]);\n } \n }\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }","title":""},{"docid":"5c20ba6fe5501ce36869c85d940b8092","score":"0.7867347","text":"public function run()\n {\n $this->call(PackageTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \\App\\Contact::create([\n 'name' => 'Herman Nelissen',\n 'email' => 'hsfnelissen@gmail.com',\n 'created_at' => '2018-10-28 21:35:27',\n 'updated_at' => '2018-10-28 21:35:27'\n ]);\n\n \\App\\Quote::create([\n 'total_price' => 2300,\n 'students' => 500,\n 'product_id' => 1,\n 'contact_id' => 1,\n 'created_at' => '2018-10-28 21:35:27',\n 'updated_at' => '2018-10-28 21:35:27'\n ]);\n\n\n }","title":""},{"docid":"1d45ae2c2a40bb81109d9488190d4318","score":"0.7853057","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\t\t\t$users = factory(App\\User::class)->times(15)->create();\n $categories = factory(App\\Category::class)->times(10)->create();\n\t\t\t$products = factory(App\\Product::class)->times(30)->create();\n\n foreach ($users as $user){\n if ($user->country == 'Argentina'){\n $user->state='Buenos Aires';\n }\n }\n\n\t\t\tforeach ($products as $oneProduct) {\n\t\t\t\t$oneProduct->user()->associate($users->random(1)->first()->id);\n\t\t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n\t\t\t\t$oneProduct->save();\n\t\t\t}\n }","title":""},{"docid":"9f671912fdabef612f6e0b6f0478edaa","score":"0.78516454","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Question::class, 10)->create()->each(function($q) {\n foreach (range(1,5) as $index) {\n $q->answers()->save(factory(App\\Answer::class)->make());\n }\n foreach (range(1,5) as $index) {\n $q->tags()->save(factory(App\\Tag::class)->make());\n }\n });\n }","title":""},{"docid":"be492c3a599cee49a50ba5a60ed47020","score":"0.78504646","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class)->create([\n 'email' => 'admin@demo.com',\n 'password' => bcrypt('secret')\n ]);\n\n factory(\\App\\Category::class, 5)->create(['parent_id' => 0]);\n factory(\\App\\Category::class, 10)->create();\n factory(\\App\\Post::class,20)->create();\n }","title":""},{"docid":"15513b06c4d4867be88d5dd7093d46be","score":"0.7843203","text":"public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@example.co',\n 'password' => bcrypt('password'),\n 'role' => User::ROLE_ADMIN\n ]);\n \\Factory(User::class, 20)->create();\n \\Factory(Instructor::class, 5)->create();\n \\Factory(Student::class, 10)->create();\n \\Factory(Course::class, 10)->create();\n \\Factory(Content::class, 50)->create();\n \\Factory(Question::class, 10)->create();\n \\Factory(Answer::class, 50)->create();\n\n foreach(Student::all() as $student) {\n $student->courses()->save(Course::all()->random());\n $student->courses()->save(Course::all()->random());\n }\n\n \\Factory(Chat::class, 50)->create();\n }","title":""},{"docid":"ca425680dd8b66e53a9919f358b1bcd1","score":"0.78391004","text":"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n rutes::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \trutes::create([\n \t\t'idrutes' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'rutnom' => $faker->sentence($nbWords = 3),\n \t\t'rutcreador' => $faker->name,\n \t\t'rutmida' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'rutlocals' => $faker->sentences($nb = 3, $asText = false),\n \t\t'rutdescripcio' => $faker->text($maxNbChars = 200),\n \t\t'rutdata' => $faker->date,\n \t\t'rutvaloracio' => $faker->numberBetween($min = 1, $max = 5),\n \t]);\n }\n }","title":""},{"docid":"22dfeb9cc91c700525ce667bb7f0c0b5","score":"0.7837788","text":"public function run()\n {\n $this->faker = Faker\\Factory::create();\n $this->emptyDatabase();\n $this->seedContacts();\n $this->seedProjects();\n $this->seedContactProjects();\n }","title":""},{"docid":"7d21aeeff6e058edf6d416a1730ee9a3","score":"0.78370357","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\t\tDB::table('authors')->truncate();\n\t\tDB::table('books')->truncate();\n\t\tDB::table('publishers')->truncate();\n\t\tDB::table('book_publisher')->truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t\t\n\t\tfor ($recordNb = 1; $recordNb <= 10; $recordNb++) {\n\t\t\tDB::table('book_publisher')->insert(\n\t\t\t\t[\n\t\t\t\t\t'book_id' => factory(App\\Book::class)->create()->id,\n\t\t\t\t\t'publisher_id' => factory(App\\Publisher::class)->create()->id\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t}","title":""},{"docid":"56e384c87eaa6052b3df9ff5b3142a6b","score":"0.78346497","text":"public function run()\n {\n $faker = Faker::create();\n\n foreach(range(1, 30) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n ]);\n DB::table('products')->insert([\n 'user_id' => $index,\n 'brand' => $faker->company,\n 'name' => $faker->word,\n 'category' => $faker->word,\n 'price' => $faker->randomFloat(2, 0, 99999),\n ]);\n DB::table('services')->insert([\n 'user_id' => $index,\n 'title' => $faker->word,\n 'category' => $faker->word,\n 'price' => $faker->randomFloat(2, 0, 99999),\n ]);\n }\n }","title":""},{"docid":"5e32b70fb5531784e31acdad60483f72","score":"0.7826652","text":"public function run()\n {\n $user = User::create([\n 'name' => 'user',\n 'email' => 'user@gmail.com',\n 'phone' => '089639385477',\n 'role' => 0,\n 'password' => Hash::make('user')\n ]);\n $categories = Category::all();\n foreach ($categories as $cat) {\n Article::create([\n 'user_id' => $user->id,\n 'category_id' => $cat->id,\n 'title' => Faker\\Provider\\id_ID\\Address::state(),\n 'description' => Faker\\Provider\\Lorem::text(),\n 'image' => Faker\\Provider\\Image::image(public_path('images/'),400,300, null, false)\n ]);\n }\n }","title":""},{"docid":"b64a5f0743ca2bf1f917364cddd2c87d","score":"0.78227943","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('game_titles')->insert([\n [\n 'title' => \"ApexLegends\",\n ],\n [\n 'title' => \"Bloodborne\",\n ],\n [\n 'title' => \"CallOfDuty\",\n ],\n ]);\n DB::table('sns')->insert([\n [\n 'name' => \"Twitter\",\n 'url' => \"a\",\n 'icon' => \"https://twitter.com/\",\n ],\n [\n 'name' => \"youtube\",\n 'url' => \"a\",\n 'icon' => \"https://YouTube.com/\",\n ],\n [\n 'name' => \"facebook\",\n 'url' => \"a\",\n 'icon' => \"https://facebook.com/\",\n ],\n [\n 'name' => \"instagram\",\n 'url' => \"a\",\n 'icon' => \"https://instagram.com/\",\n ],\n ]);\n }","title":""},{"docid":"b35f7b7df0771d4dd8ac3b5b25b0f9ba","score":"0.78203046","text":"public function run()\n {\n // User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $gender = $faker->randomElement(['male', 'female']);\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n User::create([\n 'email' => $faker->email,\n 'password' => Hash::make('password'), //$2a$10$sme1juiwmlQ3l/ccoVOwcu4STJvrmdfb/Sjulpbl1rNvBrC6oLDAK\n 'firstname' => $faker->firstName(),\n 'lastname' => $faker->lastName,\n 'age' => $faker->numberBetween(25, 60),\n 'type' => $gender,\n 'phone' => $faker->phoneNumber,\n // 'group_id' => $faker->numberBetween(1, 3)\n ]);\n } \n }","title":""},{"docid":"19f084569c94eacda8d55e19801f815b","score":"0.78179294","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // 创建一个用户\n $user = factory(User::class)->create([\n 'name' => 'iwanli',\n 'password' => bcrypt('123123')\n ]);\n // 创建四个分类\n factory(Category::class,4)->create()->each(function($category) use ($user){\n // 创建10片文章\n factory(Post::class, 10)->create([\n 'user_id' => $user->id,\n 'category_id' => $category->id,\n ])->each(function($post){\n // 随机创建2-4个标签\n factory(Tag::class, rand(2,4))->create()->each(function($tag) use ($post){\n // 添加文章和标签的关系\n PostTag::create([\n 'post_id' => $post->id,\n 'tag_id' => $tag->id,\n ]);\n });\n });\n });\n }","title":""},{"docid":"48a2b5245515b10dfedf5039d39b4bac","score":"0.78135884","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ArticleTableSeeder::class);\n /*\n Thêm 1 record vào db\n DB::table('articles')->insert([\n 'title'=>'ABC',\n 'content'=>'laia'\n ]);*/\n }","title":""},{"docid":"365f1b32ad392fb1faece80c6845ee8a","score":"0.781312","text":"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n User::create([\n \"username\" => \"usuario\",\n \"name\" => \"usuario\",\n \"email\" => \"usuario@usuario.com\",\n \"password\" => bcrypt(\"usuario\"),\n \"user_type\" => \"admin\"]);\n\n User::create([\n \"username\" => \"pedro\",\n \"name\" => \"pedro\",\n \"email\" => \"pedro@usuario.com\",\n \"password\" => bcrypt(\"usuario\"),\n \"user_type\" => \"admin\"]);\n\n\n Subreddit::create([\n \"creator_id\" => 1,\n \"name\" => \"Games\",\n \"description\" => \"A place to talk about videogames\"]);\n\n Subscription::create([\n \"user_id\" => 2,\n \"subreddit_id\" => 1]);\n\n }","title":""},{"docid":"75cb62df6863484c158e7bf137af4153","score":"0.7809263","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n User::truncate();\n Course::truncate();\n Subject::truncate();\n\n $userQuantity \t\t= 1000;\n $courseQuantity \t= 10;\n $subjectQuantity \t= 200;\n\n factory(User::class, $userQuantity)->create();\n factory(Course::class, $courseQuantity)->create();\n factory(Subject::class, $subjectQuantity)->create()->each(\n \tfunction($subject){\n \t\t$courses = Course::all()->random(mt_rand(1,5))->pluck('id');\n $subject->courses()->attach($courses);\n \n $staff = User::all()->random(mt_rand(1,5))->pluck('id');\n $subject->staffs()->attach($staff);\n \n $student = User::all()->random(mt_rand(1,5))->pluck('id');\n $subject->students()->attach($student);\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }","title":""},{"docid":"7f26a02b92952342b834fb9336b7495c","score":"0.78090334","text":"public function run()\n {\n Eloquent::unguard();\n\n $truncate = [\n 'users',\n 'products',\n 'reviews',\n ];\n // To remove previous data from database\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n foreach ($truncate as $table) {\n DB::table($table)->truncate();\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Product::class,50)->create();\n factory(App\\Model\\Review::class,50)->create();\n }","title":""},{"docid":"95e059a4616f6c77fd9ef5fb8646df09","score":"0.78027606","text":"public function run()\n {\n $faker = Faker::create('App\\Models\\News');\n\n // Creating 10 dummy news with users in the DB\n for ($i=0; $i < 10; $i++) {\n DB::table('news')->insert([\n 'title'=> $faker->sentence($nbWords = 6, $variableNbWords = true),\n 'content'=> $faker->text($maxNbChars = 200),\n // making new user everytime a new news is made via seeder\n 'user_id'=> User::factory()->create()->id,\n 'updated_at' => now(),\n 'created_at' => now(),\n ]);\n }\n\n }","title":""},{"docid":"7576af445bb78ab6c07c30e0d6047f27","score":"0.7797619","text":"public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n \\App\\Models\\User::create([\n 'username'=>'admin',\n 'nickname'=>'John Doe',\n 'password'=>\\bcrypt('123456'),\n ]);\n\n \\App\\Models\\Article::factory()->times(5)->create();\n\n \\App\\Models\\Comment::factory()->times(5)->create();\n\n \\App\\Models\\Feedback::factory()->times(5)->create();\n\n \\App\\Models\\Category::create([\n 'name'=>'历史',\n 'parent_id'=>0\n\n ]);\n\n $this->call([\n SettingSeeder::class,\n ]);\n\n }","title":""},{"docid":"a9ff49d78b82f3a74d3064b1e540bf86","score":"0.77963626","text":"public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n // $this->call(ArticleTableSeeder::class);\n $this->call(ArticlesTableSeeder::class);\n\n DB::table('articles')->insert([\n 'title' => Str::random(50),\n 'body' => Str::random(50),\n ]);\n\n }","title":""},{"docid":"476cadcd72726378c148f07886c0964c","score":"0.7794292","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Administrator\n $administrator = factory(\\App\\User::class)->create(['email' => 'administrator@mr.com', 'role' => 'ADMINISTRATOR']);\n\n // Customer Model\n $customerUser = factory(\\App\\User::class)->create(['email' => 'customer@mr.com', 'role' => 'CUSTOMER']);\n $customer = factory(\\App\\Customer::class)->create(['user_id' => $customerUser->id]);\n\n // Products\n for ($i=0; $i < 5; $i++) {\n $productCategory = factory(\\App\\ProductCategory::class)->create();\n $product = factory(\\App\\Product::class)->create();\n $product->productCategories()->sync([$productCategory->id]);\n }\n\n // Delivery Fees\n factory(\\App\\DeliveryFee::class)->create(['from' => 0, 'to' => 3, 'fee' => 50]);\n factory(\\App\\DeliveryFee::class)->create(['from' => 3, 'to' => 6, 'fee' => 75]);\n factory(\\App\\DeliveryFee::class)->create(['from' => 6, 'to' => 9, 'fee' => 100]);\n }","title":""},{"docid":"da9353a2cd732b4fd068cbe28b73cbcc","score":"0.7791213","text":"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(TacticSeeder::class);\n $this->call(UserSeeder::class);\n\n $courses = Course::with('users')->get();\n\n foreach ($courses as $course) {\n $exercises = Exercise::factory()->count(8)->create(['user_id' => $course->user_id]);\n foreach ($exercises as $exercise) {\n $exercise->courses()->attach($course->id);\n $exercise->tactics()->attach(Tactic::all()->random()->id);\n }\n }\n }","title":""},{"docid":"06d0f251e5b64ba99e07b28c19b0f866","score":"0.7789426","text":"public function run()\n {\n\n $roles = ['Admin', 'Teacher', 'Student'];\n foreach ($roles as $role) {\n \\App\\Models\\Role::create([\n 'title' => $role\n ]);\n }\n\n $subjects = ['English', 'Math', 'Physics', 'Computer'];\n foreach ($subjects as $subject) {\n \\App\\Models\\Subject::create([\n 'title' => $subject\n ]);\n }\n\n $levels = ['Primary', 'Elementary', 'Secondary', 'High'];\n foreach ($levels as $level) {\n \\App\\Models\\Level::create([\n 'title' => $level\n ]);\n }\n\n // $this->call(UsersTableSeeder::class);\n }","title":""},{"docid":"2e30615d54a3a5cf829c10d31a5c04f7","score":"0.77874225","text":"public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n\n factory(App\\Curso::class, 5)->create();\n\n factory(App\\Alumno::class, 10)->create()->each(function(App\\Alumno $alumno){\n //se relaciona un post con un tag\n $alumno->cursos()->attach([\n rand(1,5), //el primer post se relaciona con las primeras cinco etiquetas\n \n \n ]);\n });\n }","title":""},{"docid":"7c8fed78f76fb9e1e482206dd1ea48d5","score":"0.7786723","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(LaratrustSeeder::class);\n\t\tDB::table('settings')->insert(\n array('name' => 'College of Engineering ', 'dean' => 'De Vera, Angel V. Jr.')\n );DB::table('sections')->insert(\n array('name' => 'EC-4-1')\n );DB::table('courses')->insert(\n array('name' => 'ECE')\n );DB::table('subjects')->insert(\n array('name' => 'ECE-525a', 'description' => 'industrial electronics')\n );\n }","title":""},{"docid":"dc3f4e5598777e48341bac775cb1fb7f","score":"0.77851945","text":"public function run()\n {\n // create an instance of Faker class to the variable $faker\n $faker = Faker::create();\n\n // get all existing user ids into a $users array\n $users = User::all()->pluck('id')->toArray();\n\n // generate 100 records for the animals table\n foreach (range(1,100) as $index){\n DB::table('animals')->insert([\n //'id'=>$faker->randomNumber($nbDigits = 7, $strict = false),\n 'userid' => 5,\n 'name' =>$faker->firstName(),\n 'birth_year' =>$faker->year($max = 'now'),\n 'description'=>$faker->sentence($nbWords = 6, $variableNbWords = true),\n 'type_of_pet'=>$faker->randomElement($array=array('cat','dog','bird',\n 'rabbit', 'horse','ferret',\n 'fish', 'rat/mice',\n 'amphibian','reptile')),\n 'is_available' => 1,\n 'created_at' => now()\n ]);\n }\n }","title":""},{"docid":"6419861cc2705b3341ba36acf9522390","score":"0.7782119","text":"public function run()\n {\n Model::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('comments')->truncate();\n\n factory(App\\User::class, 5)->create()->each(function($user){\n factory(App\\Post::class, random_int(1, 5))->create([\n 'post_author' => $user->id\n ]);\n\n factory(App\\Comment::class, random_int(1,5))->create([\n 'comment_author' => $user->id,\n 'post_id' => random_int(1,5)\n ]);\n });\n\n \\App\\User::create([\n 'name' => 'writer',\n 'username' => 'writer',\n 'email' => 'writer@example.com',\n 'password' => Hash::make('password'),\n 'remember_token' => str_random(10)\n ])->save();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n Model::reguard();\n }","title":""},{"docid":"78cc789dd6e437818d7cdb71821fa4b4","score":"0.77758443","text":"public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::table('companies')->truncate();\n\t\tDB::table('employees')->truncate();\n\n\t\tfor ($i=0; $i < 100; $i++) {\n\t\t\t$company = Company::create([\n\t\t\t\t'name' => $faker->company,\n\t\t\t\t'business' => $faker->bs\n\t\t\t]);\n\t\t\tfor ($j=0; $j < 50; $j++) {\n\t\t\t\tEmployee::create([\n\t\t\t\t\t'company_id' => $company->id,\n\t\t\t\t\t'name' => $faker->name,\n\t\t\t\t\t'job_title' => $faker->sentence(3),\n\t\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t\t'email' => $faker->email,\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}","title":""},{"docid":"c1b6a34aec59e70ff9fc40ff23f7adc0","score":"0.77758276","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('collection_list')->insert([\n 'name' => 'Sprint 2020',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n DB::table('collection_list')->insert([\n 'name' => 'Balticman Russia 2021',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }","title":""},{"docid":"89ce10a423732bada80a9877f588142e","score":"0.7766432","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $data_services = [\n \t'image_name' => '1.jpg',\n \t'urlservices' => 'bao-gia-chup-anh-ky-yeu',\n \t'title' => 'CHỤP ẢNH KỶ YẾU',\n \t'content' => 'Chụp ảnh kỷ yếu tại Đà Nẵng và các tỉnh miền trung, cho thuê đầy đủ trang phục chụp ảnh kỷ yếu. Các concept mới lạ và vô cùng hấp dẫn đang chờ..'\n ];\n\n $data_test = [\n 'test3' => 'default',\n ];\n\n // DB::table('services')->insert($data_services);\n DB::table('test3')->insert($data_test);\n }","title":""},{"docid":"927afdf7da13d136851abcd125662bfa","score":"0.7764285","text":"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // BlogCategories::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n $title = $faker->sentence;\n $slug = Str::slug($title);\n BlogCategories::create([\n 'title' => $title,\n 'slug' => $slug,\n 'published' => $faker->boolean($chanceOfGettingTrue = 50),\n ]);\n }\n }","title":""},{"docid":"19e1efc56559470b618ca6cd001870f9","score":"0.77625036","text":"public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n * $users = factory(App\\User::class, 3)\n ->create()\n ->each(function($u) {\n $u->posts()->save(factory(App\\Post::class)->make());\n });\n */\n\n //$users = factory(\\App\\Entities\\User::class, 49)->create();\n //$categories = factory(\\App\\Entities\\Category::class, 10)->create();\n //$folders = factory(\\App\\Entities\\Folder::class, 150)->create();\n\n $urls = factory(\\App\\Entities\\Url::class, 400)->create()->each(function($u){\n $u->categories()->sync(\\App\\Entities\\Category::all()->random(3));\n $u->folders()->sync(\\App\\Entities\\Category::all()->random(2));\n });\n }","title":""},{"docid":"fb68f54cb7c951e64affa64a0b297782","score":"0.77620983","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n $quantityUser = 1000;\n $quantityCategory = 30;\n $quantityProduct = 1000;\n $quantityTransaction = 1000;\n\n factory(User::class, $quantityUser)->create();\n factory(Category::class, $quantityCategory)->create();\n\n factory(Product::class, $quantityProduct)->create()->each(function($product){\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($categories);\n });\n factory(Transaction::class, $quantityTransaction)->create();\n }","title":""},{"docid":"3efab65efe8beca35c2f5491dd14f940","score":"0.7758514","text":"public function run()\n {\n /*\n $this->call([\n UsersTableSeeder::class,\n ]);\n */\n\n // Test user for authentication\n factory(User::class)->create([\n 'name' => 'Elias Johansson',\n 'biography' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum provident magnam voluptates quidem, ipsa molestiae fuga ullam deserunt at aspernatur! Saepe vero, voluptates animi mollitia sint voluptatum ducimus ipsa vel?',\n 'username' => 'EliasJ',\n 'email' => 'elias_johansson@hotmail.se',\n 'email_verified_at' => now(),\n 'password' => 'password',\n 'remember_token' => str_random(10),\n ]);\n\n factory(User::class, 10)->create()->each(function ($user) {\n factory(Post::class, rand(0, 5))->create(['user_id' => $user->id])->each(function ($post) {\n\n $randCount = rand(0, User::count());\n $randomUsers = User::inRandomOrder()->take($randCount)->get();\n\n $randomUsers->each(function ($randUser) use ($post) {\n factory(Vote::class)->create(['user_id' => $randUser->id, 'voted_id' => $post->id]);\n });\n });\n });\n\n factory(Follow::class)->create(['follower_id' => 1, 'followee_id' => 2]);\n\n }","title":""},{"docid":"cd90f857c514e1c773f1be87e5dfa64c","score":"0.7758508","text":"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n \\Illuminate\\Support\\Facades\\DB::statement(\"SET foreign_key_checks=0\");\n \\App\\Models\\Movie::truncate();\n \\Illuminate\\Support\\Facades\\DB::statement(\"SET foreign_key_checks=1\");\n\n for ($i = 0; $i < 20; $i++) {\n \\App\\Models\\Movie::create(\n [\n 'title' => ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word),\n 'director' => $faker->name,\n 'description' => $faker->text,\n 'poster_path' => 'images/sample_movie_poster/' . rand(1,10) . '.png',\n 'publish_at' => \\Carbon\\Carbon::now()->subDays(rand(1,10)),\n 'rating' => rand(1,5),\n 'comment_count' => rand(1,100),\n 'like_count' => rand(1,500),\n 'unlike_count' => rand(1,30),\n ]\n );\n }\n }","title":""},{"docid":"91317243366fd0817cbd1d5874e0d4fd","score":"0.77559274","text":"public function run()\n {\n $this->seed('EnquiriesTableSeeder');\n $this->seed('FormsTableSeeder');\n $this->seed('InputsTableSeeder');\n $this->seed('DataTableSeeder');\n }","title":""},{"docid":"e3ecd8841e5c87217a3b633febe5ecb6","score":"0.775367","text":"public function run()\n {\n $this->seed(DataTypesTableSeeder::class);\n $this->seed(DataRowsTableSeeder::class);\n $this->seed(MenusTableSeeder::class);\n $this->seed(MenuItemsTableSeeder::class);\n $this->seed(RolesTableSeeder::class);\n $this->seed(PermissionsTableSeeder::class);\n $this->seed(PermissionRoleTableSeeder::class);\n $this->seed(SettingsTableSeeder::class);\n }","title":""},{"docid":"58699f4c1c3829bc0bf3b1b2107cf4d8","score":"0.7750695","text":"public function run()\n {\n \tDB::statement(\"SET FOREIGN_KEY_CHECKS=0\");\n \tfactory(App\\User::class,10)->create()->each(function($user){\n\n \t\t$user->posts()->save(factory(App\\Post::class )->make());\n \t\t\n \t});\n \tfactory(App\\Role::class,3)->create(); \t\n \tfactory(App\\Category::class,5)->create(); \t\n \tfactory(App\\Photo::class,1)->create(); \t\n\n\n // $this->call(UsersTableSeeder::class);\n }","title":""},{"docid":"c9df141f7b179d1aa331fe8dbfc58ebc","score":"0.7750042","text":"public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(PermissionAndGroupSeeder::class);\n $this->call(PermissionPierAndCategoriesSeeder::class);\n $this->call(PierCategoriesSeeder::class);\n $this->call(PiersSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(CountriesSeeder::class);\n $this->call(CompanyTypesSeeder::class);\n Country::whereIn('name', [\n 'INDONESIA',\n 'MALAYSIA',\n 'PHILIPPINES',\n 'SINGAPORE',\n 'THAILAND'\n ])->update(['highlighted'=> true]);\n Boat::factory()->count(60)->create();\n Ship::factory()->count(5000)->create();\n AccessRequest::factory()->count(60)->create();\n Company::factory()->count(10)->create();\n }","title":""},{"docid":"ac07049886266992b4877e0bbac4f46e","score":"0.7747288","text":"public function run()\n /*collect alle db seeds voor seeding */\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(CouponsTableSeeder::class);\n }","title":""},{"docid":"985b4aaf160ac664b8922a8544515d44","score":"0.7742104","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1, 20) as $index){\n DB::table('blogs')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n ]);\n } */\n }","title":""},{"docid":"aca9b2cf26903130f7380f92f55a473c","score":"0.77418184","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Book::truncate();\n College::truncate();\n\n $userQuantity = 50;\n\n factory(User::class, 50)->create();\n factory(Book::class, 50)->create();\n factory(College::class, 2)->create();\n }","title":""},{"docid":"30d64a1e579c6e0f0a830b95c66b1bfa","score":"0.7741139","text":"public function run()\n {\n $this->empresarSeeder();\n $this->empresarPersonaSeeder();\n }","title":""},{"docid":"470a485c944168ddbe9d5621e9882146","score":"0.7738656","text":"public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n factory(Category::class, 6)->create();\n factory(Tag::class, 10)->create();\n factory(Post::class, 30)->create();\n }","title":""},{"docid":"3727173589775f381466040e171579e2","score":"0.77327454","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call([\n UsersTableSeeder::class,\n PostsTableSeeder::class,\n CommentsTableSeeder::class,\n ]);\n /* DB::table('posts')->insert([\n 'title' => 'Car',\n 'content' => 'Super cool car',\n ]);\n DB::table('posts')->insert([\n 'title' => 'Another Car',\n 'content' => 'Another Super cool car',\n ]);\n DB::table('comments')->insert([\n 'user_id' => '12',\n 'post_id' => '1',\n 'content' => 'Dear Car Talk: I have a 1951 Chevy, straight-6, 3-on-the-tree, with 31,000 actual miles. Nice car.',\n ]);\n DB::table('comments')->insert([\n 'user_id' => '9',\n 'post_id' => '1',\n 'content' => 'Nice car!',\n ]);\n */\n }","title":""},{"docid":"0edbf15de8e4e944dd2074ed1b57afd8","score":"0.7727652","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* factory(App\\User::class,100)->create();\n factory(App\\Modele\\Category::class,20)->create(); \n factory(App\\Modele\\Post::class,1500)->create();\n\n factory(App\\Modele\\Tag::class,50)->create();\n factory(App\\Modele\\Image::class,3500)->create(); \n factory(App\\Modele\\Video::class,1050)->create();\n factory(App\\Modele\\Comment::class,4500)->create();*/ \n }","title":""},{"docid":"cdc741a314743eae755e3c22f3f76551","score":"0.772744","text":"public function run()\n {\n $this->seedUser();\n// $this->seedCategoryAndPosts();\n }","title":""},{"docid":"38858c934978757be077df51a3a020d1","score":"0.7727246","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // inicializa tabla USERS\n DB::table(\"users\")->insert(\n [\n \"id\"=> 1,\n \"name\" =>\"admin\",\n \"email\"=>\"admin@admin.com\",\n \"email_verified_at\"=> NULL,\n \"password\"=>'$2y$10$hhTW0KElMnPuQO9GFZT1yOIrXd6LI/KabIAMWv0kYNlql0pZtEMjS',\n \"facebook\" => \"admin\",\n \"twitter\"=>\"admin\",\n \"instagram\"=>\"admin\",\n \"avatar\"=>\"userImage.png\",\n \"rol_id\"=>2, \n \"created_at\" =>NULL,\n \"updated_at\" =>NULL\n ]\n );\n\n // inicializa tabla PAIS\n DB::table(\"pais\")->insert(\n [\n \"id_pais\"=> 1,\n \"nombre_pais\" => \"Argentina\",\n \"created_at\" =>NULL,\n \"updated_at\" =>NULL\n ]\n );\n\n // inicializa tabla PROVINCIAS\n factory(App\\Provincia::class, 23)->create();\n\n // inicializa tabla DESTINOS\n factory(App\\Destino::class, 20)->create();\n\n // inicializa tabla COMENTARIOS\n factory(App\\Comentario::class, 10)->create();\n\n // inicializa tabla FAVORITOS\n factory(App\\Favorito::class, 5)->create();\n \n // inicializa tabla MENSAJES\n factory(App\\Mensaje::class, 5)->create();\n }","title":""},{"docid":"258a68b251e7e52b90e764a986aea0f9","score":"0.772715","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Property::class, 5)->create();\n factory(App\\Contact::class, 5)->create();\n factory(App\\Feature::class, 5)->create();\n factory(App\\Location::class, 5)->create();\n factory(App\\Image::class, 5)->create();\n factory(App\\Video::class, 5)->create();\n factory(App\\Tag::class, 5)->create();\n factory(App\\Employee::class, 5)->create();\n factory(App\\PropertyEmployee::class, 5)->create();\n factory(App\\User::class, 5)->create();\n factory(App\\UserEmployee::class, 5)->create();\n factory(App\\UserDetail::class, 5)->create();\n }","title":""},{"docid":"9ddfa6b8e708696db5d12d34c9d4f728","score":"0.77262276","text":"public function run()\n {\n // Seed with fake role.\n // factory(App\\Role::class, 3)->create();\n \n // Seed with real life roles.\n $roles = [\n ['id'=> 250, 'role' => 'Banned', 'vote_weight' => 0, 'spam_threshold' => 0],\n ['id'=> 500, 'role' => 'Registered user', 'vote_weight' => 1, 'spam_threshold' => 10],\n ['id'=> 750, 'role' => 'Confirmed user', 'vote_weight' => 2, 'spam_threshold' => 50],\n ['id'=> 875, 'role' => 'Editor', 'vote_weight' => 3, 'spam_threshold' => 200],\n ['id'=> 1000, 'role' => 'Administrator', 'vote_weight' => 4, 'spam_threshold' => 1000],\n ];\n \n foreach ($roles as $role) {\n Role::create($role);\n }\n }","title":""},{"docid":"da35f91bdc164c9487439ff37cc282a4","score":"0.7723784","text":"public function run()\n {\n // $this->call(UserSeeder::class);\n Admin::create([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('password'),\n ]);\n\n Employee::create([\n 'name' => 'pegawai',\n 'address' => 'surabaya',\n 'phone' => 86665656666,\n 'email' => 'pegawai@gmail.com',\n 'password' => bcrypt('password'),\n ]);\n\n User::create([\n 'name' => 'user',\n 'email' => 'user@gmail.com',\n 'password' => bcrypt('password'),\n ]);\n }","title":""},{"docid":"65ebc2415901c1804329cb5eda67fd26","score":"0.7723222","text":"public function run()\n {\n\n\n\n $faker = Faker\\Factory::create();\n\n DB::table('users_roles')->insert([\n 'name' => 'Admin',\n\n ]);\n DB::table('users_roles')->insert([\n 'name' => 'Editor',\n\n ]);\n DB::table('users_roles')->insert([\n 'name' => 'Guest',\n\n ]);\n }","title":""},{"docid":"1e0f063fa5c69434fdf04122ef66efe5","score":"0.77228445","text":"public function run()\n {\n // Wipe the table clean before populating\n DB::table('users')->delete();\n\n $users = array(\n [\n \"name\" => \"Auto Customs Inc.\",\n \"phone\" => '877-204-7002',\n \"email\" => \"name@autocustoms.com\",\n ],\n [\n \"name\" => \"Philip Meckling\",\n \"phone\" => '321-501-1234',\n \"email\" => \"slydvox@aol.com\",\n ],\n [\n \"name\" => \"Joe Blough\",\n \"phone\" => '888-123-4567',\n \"email\" => \"jb@mykumpnee.com\",\n ],\n\n );\n\n // Run the seeder\n DB::table('users')->insert($users);\n }","title":""},{"docid":"e37cab7241cc60bd3248948e0026f7c7","score":"0.7722144","text":"public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(GenreSeeder::class);\n\n $users = User::factory(10)->hasAttached(Role::find(2))->create();\n\n $artists = Artist::factory(10)->create();\n\n // artists and genres must be generated before songs\n $songs = Song::factory(100)->create();\n\n // users must be generated before playlists. \n // playlist_song entries are created with the hasAttached method.\n $playlists = Playlist::factory(10)->hasAttached($songs)->create();\n }","title":""},{"docid":"ad511f434f764c2a5e866a1356beb2a7","score":"0.77177405","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('groups')->insert([['group_name' => 'student'],['group_name' => 'employee']]);\n DB::table('system_roles')->insert([['role_name' => 'none'],['role_name' => 'beadle'],['role_name' => 'osa'],['role_name' => 'teacher']]);\n }","title":""},{"docid":"4315481d0f561c009a68fbd4d76a6b88","score":"0.77141565","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $faker = Faker\\Factory::create();\n\n\n DB::table('users')->delete();\n\n for($i = 0; $i < 10; ++$i)\n {\n DB::table('users')->insert([\n 'name' => 'Nom' . $i,\n 'email' => 'email' . $i . '@blop.fr',\n 'avatar' => 'profile.png',\n 'admin' => rand(0, 1),\n 'password' => bcrypt('password' . $i)\n ]);\n }\n\n for ($i=0;$i<10;$i++)\n {\n DB::table('membres_tribunal')->insert( [\n\n 'nom'=>str_random(10),\n 'telephone'=>mt_rand(666666666,699999999),\n 'grade'=> 'Avocat'\n ]);\n }\n }","title":""},{"docid":"32fcf6bca24d0a313359673895169dfc","score":"0.7713102","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //DB::statement('SET FOREIGN_KEYS_CHECKS = 0');\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //MySql\n Libro::truncate();\n Libreria::truncate();\n\n $countLibreria = 50;\n $countLibros = 5000;\n\n factory(Libreria::class, $countLibreria)->create();\n factory(Libro::class, $countLibros)->create();\n }","title":""},{"docid":"384e8b5815d2e9af9d70eae3d52245a6","score":"0.77096856","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(Address::class,1000)->create();\n // factory(User::class,500)->create();\n //factory(Product::class,1500)->create();\n //factory(Image::class,1000)->create();\n factory(Review::class,3500)->create();\n //factory(Category::class,50)->create();\n //factory(Tag::class,150)->create();\n //factory(Role::class,5)->create();\n //factory(Ticket::class,7)->create();\n }","title":""},{"docid":"bdf9c786dbc3525631942e19087b8a23","score":"0.7705496","text":"public function run()\n {\n Book::create([\n 'title' => 'The Two Towers',\n 'author' => 'J.R.R. Tolkien'\n ]);\n Book::create([\n 'title' => 'Man in Search of Meaning',\n 'author' => 'Viktor Frankl'\n ]);\n Book::create([\n 'title' => 'The Alchemist',\n 'author' => 'Paolo Coehlo'\n ]);\n Book::create([\n 'title' => 'East of Eden',\n 'author' => 'John Steinbeck'\n ]);\n Book::create([\n 'title' => 'Aeneid',\n 'author' => 'Virgil'\n ]);\n Book::create([\n 'title' => 'Paradiso',\n 'author' => 'Dante Alighieri'\n ]);\n }","title":""},{"docid":"17a5e5a2dc7a47f3dc1d9f42adc78825","score":"0.77012074","text":"public function run()\n {\n $this->call(CommunitySeeder::class);\n // $this->call(PolingSeeder::class);\n DB::table('poling')->insert([\n 'title' => 'Pemilihan Ketua',\n 'description' => 'Pemilihan',\n 'start_at' => '2021-08-24',\n 'stop_at' => '2021-08-25'\n ]);\n $this->call(UserSeeder::class);\n $this->call(CandidateSeeder::class);\n }","title":""},{"docid":"02839fd48d7058b2c787b8ed974c5c65","score":"0.770105","text":"public function run()\n {\n // User::truncate();\n // Category::truncate();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => Hash::make('12345678'),\n 'username' => 'admin',\n 'isAdmin' => '1',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'ที่นอน',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n // $this->call(UsersTableSeeder::class);\n }","title":""},{"docid":"03809687e5d587409a10b664ad575d6d","score":"0.7699341","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // create default townships\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 30; $i++) {\n \\App\\Models\\Township::create([\n 'code' => $faker->numberBetween(1000000, 22002038),\n 'area' => $faker->numberBetween(20, 500),\n 'location' => $faker->address,\n 'latitude' => $faker->numberBetween(232322, 44534445),\n 'longitude' => $faker->numberBetween(232322, 44534445)\n ]);\n }\n }","title":""},{"docid":"6bcd80a79b26bc6230d0dbafbf53a13d","score":"0.7699336","text":"public function run()\n {\n //empty the database first\n DB::table('books')->delete();\n\n $books = [\n\n [\n 'user_id' => 1,\n 'title' => 'Laravel 5.7 For Dummies',\n 'description' => 'This is the right book for you if you want to get started with using the Laravel framework',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n [\n 'user_id' => 1,\n 'title' => 'Laravel vs Node.js',\n 'description' => 'This is an ebook comparing the difference and similarities between Laravel and Node.js',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n ];\n\n DB::table('books')->insert($books);\n }","title":""},{"docid":"33c290db4d794815321050e69479ef9e","score":"0.76983786","text":"public function run()\n {\n /**\n * truncates tables before seeding\n */\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n App\\User::truncate();\n App\\Product::truncate();\n App\\Transaction::truncate();\n App\\Category::truncate();\n DB::table('category_product')->truncate();\n\n\n\n /**\n * prevent Events \n */\n User::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n Category::flushEventListeners();\n\n /**\n * seeding table users\n */\n factory(App\\User::class,1000)->create();\n /**\n * seeding table categories\n */\n factory(App\\Category::class,30)->create();\n /**\n * seeding table products and the pivot table\n */\n factory(App\\Product::class,1000)->create()->each(\n function($product){\n $categories = App\\Category::all()->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($categories);\n });\n /**\n * seeding table transactions\n */\n factory(App\\Transaction::class,1000)->create();\n\n }","title":""},{"docid":"3ab1da7523b244be048582931b4784b6","score":"0.76981217","text":"public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n factory(App\\Product::class, 50)->create();\n factory(App\\User::class, 6)->create();\n\n factory(App\\Category::class, 20)->create();\n factory(App\\Tag::class, 21)->create();\n\n factory(App\\Post::class, 300)->create()->each(function(App\\Post $post){\n $post->tags()->attach([\n rand(1,5),\n rand(6,14),\n rand(15,20),\n\n ]);\n });\n //fregona para cargar tablas pivote recordar dar de alta la relacioón sino no funciona\n\n\n Role::create([\n 'name' => 'Admin',\n 'slug' => 'admin',\n 'special' => 'all-access'\n ]);\n\n App\\User::create([\n 'name'=>'rodrigo',\n 'email'=>'rodrigo@gmail.com',\n 'password'=>bcrypt('rorro'),\n\n ]);\n }","title":""},{"docid":"6b51251d22df55c7b04c27df5213a7b2","score":"0.76964283","text":"public function run()\n {\n $categories = factory(Category::class)->times(5)->create();\n // $product = factory(Product::class)->times(5)->create();\n \n foreach ($categories as $category) {\n factory(Product::class)->times(3)->create([\n 'category_id' => $category->id\n ]);\n }\n\n $this->call([\n UsersTableSeeder::class,\n ]);\n }","title":""},{"docid":"fb8674413c8a4104e4b1c436f70ed975","score":"0.7695707","text":"public function run()\n {\n //factory('App\\User',60)->create();\n // $this->call(UsersTableSeeder::class);\n /*$faker = Faker::create();\n foreach (range(1,5) as $index) {\n \t$my_category = DB::table('ordercategorgies')->insert([\n\t \t'order_type' => $faker->randomElement(['local food' ,'take away']),\n\t \t'food_photo' => $faker->imageUrl($width = 100, $height = 100),\n\t ]);\n }*/\n // dd($my_food);\n \n }","title":""},{"docid":"a18a3a4890fe667e04bd7d3caf5a59e7","score":"0.7693732","text":"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n// $categories = Category::factory(5)->create();\n// $sources = Source::factory(5)->create();\n//\n// foreach ($categories as $category)\n// {\n// foreach ($sources as $source)\n// {\n// News::factory(10,\n// [\n// 'category_id' => $category->id,\n// 'source_id' => $source->id,\n// ])\n// ->create();\n// }\n// }\n\n $sources = Source::factory(10)->create();\n\n Category::factory(10)\n ->create()\n ->each(function ($category) use ($sources) {\n News::factory(10,\n [\n 'category_id' => $category->id,\n 'source_id' => $sources[rand(0, count($sources) - 1)]->id,\n ])\n ->create();\n });\n }","title":""},{"docid":"329b24a3b852e37339619d080f8e67c4","score":"0.76924825","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name'=>'Information Technology',\n 'abbreviation'=>'IT',\n 'email'=>'admin@it.com',\n 'password'=>Hash::make('itpass'),\n 'role'=>'Admin'\n ]);\n\n // DB::table('inventories')->insert([\n // 'motherboard'=>'helasd',\n // 'cpu'=>'asd',\n // 'hdd'=>'dg',\n // 'memory'=>'agdfsd',\n // 'monitor'=>'sdfg',\n // 'case'=>'dsfgd',\n // 'keyboard'=>'',\n // 'mouse'=>'',\n // 'video_card'=>'',\n // 'power_supply'=>'',\n // 'printer'=>'',\n // 'telephone'=>''\n // ]);\n \n DB::table('users')->insert([\n 'name'=>'Human Resource',\n 'abbreviation'=>'HR',\n 'email'=>'admin@hr.com',\n 'password'=>Hash::make('hrpass'),\n 'role'=>'User'\n ]);\n }","title":""},{"docid":"f312cccea49d3336d07a2c524243b0e9","score":"0.7692105","text":"public function run()\n {\n /*\n * In a real production system, I imagine you'd either seed\n * reasonable credentials for a trusted user, or you'd have\n * no seeder and have someone with database access insert\n * the first user manually.\n * It's not necessary for the admin user to be an author,\n * but why waste seeded data?\n * Explicitly stated ID of 1 should fail if there's any data in\n * the table. Only run these seeders on a fresh database.\n */\n DB::table('users')->insert(\n [\n 'id' => 1,\n 'name' => 'Admin Admin',\n 'email' => 'admin@example.com',\n 'password' => bcrypt('password'),\n 'isAdmin' => true,\n 'isAuthor' => true,\n ]\n );\n\n DB::table('users')->insert(\n [\n 'id' => 2,\n 'name' => 'Arthur Author',\n 'email' => 'author@example.com',\n 'password' => bcrypt('password'),\n 'isAuthor' => true,\n ]\n );\n }","title":""},{"docid":"7257c69616adc43e5cde09cbe9609093","score":"0.7689786","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Articulo::class,10)->create();\n // factory(App\\Periodista::class,10)->create();\n // factory(App\\Sucursal::class,10)->create();\n // factory(App\\Tipo::class,10)->create();\n // factory(App\\Empleado::class,10)->create();\n // factory(App\\Revista::class,10)->create();\n // factory(App\\Periodista_Articulo::class,10)->create();\n factory(App\\Revista_Articulo::class,10)->create();\n //factory(App\\Sucursal_Revista::class,10)->create(); \n }","title":""},{"docid":"0b28aea8b99ae559650697917bb74848","score":"0.7688806","text":"public function run()\n {\n $faker = Faker::create();\n Schema::disableForeignKeyConstraints();\n DB::table('positions')->truncate();\n\n $positions = [];\n $stores = DB::table('stores')->take(10)->get();\n\n foreach ($stores as $store) {\n $positions[] =\n [\n 'name' => 'Lightbox_' . $faker->randomNumber(2),\n 'description' => $faker->text,\n 'image_url'=> '',\n 'store_id' => $store->id,\n 'channel' => 'Lightbox',\n 'buffer_days' => 2,\n 'unit' => 'day',\n 'price' => 2000000,\n ];\n $positions[] =\n [\n 'name' => 'Billboard_' . $faker->randomNumber(2),\n 'description' => $faker->text,\n 'image_url'=> '',\n 'store_id' => $store->id,\n 'channel' => 'Billboard',\n 'buffer_days' => 2,\n 'unit' => 'day',\n 'price' => 5000000,\n ];\n }\n\n DB::table('positions')->insert($positions);\n Schema::enableForeignKeyConstraints();\n }","title":""},{"docid":"fdceb467a92f830a50199ac2a220b8b3","score":"0.7685507","text":"public function run()\n {\n\n //create 3 users\n //Illuminate\\Support\\Facades\\DB::table('users')->delete();\n factory(App\\Models\\User::class, 3)->create();\n factory(\\App\\Models\\Country::class, 50)->create();\n factory(\\App\\Models\\Genre::class, 10)->create();\n factory(\\App\\Models\\Comment::class, 3)->create();\n\n //assign each film to a genre\n \\App\\Models\\Film::all()->each(function($film) {\n factory(\\App\\Models\\FilmGenres::class, 1)->create(['film_id'=>$film->id]);\n });\n }","title":""},{"docid":"08ef2d96ca9f09f01db166c921bcded0","score":"0.768112","text":"public function run()\n {\n $this->call(UsersTableSeeder::class);\n // $this->call(StaticContentSeeder::class);\n // factory(App\\Menu::class, 20)->create();\n // factory(App\\Page::class, 20)->create();\n // factory(App\\PageItem::class, 20)->create();\n // factory(App\\Company::class, 20)->create();\n // factory(App\\Announcment::class, 20)->create();\n // factory(App\\Survey::class, 20)->create();\n // factory(App\\SurveyQuestion::class, 20)->create();\n // factory(App\\SurveyAnswerOption::class, 20)->create();\n // factory(App\\SurveyHit::class, 20)->create();\n // factory(App\\Transaction::class, 20)->create();\n // factory(App\\StaticContent::class, 20)->create();\n // factory(App\\Search::class, 20)->create();\n // factory(App\\Sector::class, 20)->create();\n // factory(App\\SubscriptionPlan::class, 20)->create();\n }","title":""},{"docid":"b05010d7103a3a12b2577b68b3dba100","score":"0.7679989","text":"public function run()\n {\n// DB::table('users')->truncate();\n// DB::table('roles')->truncate();\n\n $this->call(RoleCreateSeeder::class);\n factory(App\\Models\\User::class, 10)->create();\n factory(App\\Models\\Category::class,20)->create();\n factory(App\\Models\\Post::class,1000)->create();\n }","title":""},{"docid":"884fc4f5db946c3ac90deba14a0e705d","score":"0.7676729","text":"public function run()\n {\n User::create([\n 'username' => 'admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('111'),\n 'role_id' => 1,\n 'email_verified_at' => date('Y-m-d h:i:s'),\n ]);\n\n // $faker = Faker::create();\n \t// foreach (range(1,20) as $index) {\n\t // DB::table('users')->insert([\n // 'username' => strtolower($faker->unique()->firstName()),\n\t // 'email' => $faker->email,\n // 'password' => bcrypt('111'),\n // 'role_id' => 2,\n // 'email_verified_at' => $faker->date('Y-m-d', 'now')\n\t // ]);\n\t // }\n\n }","title":""},{"docid":"b4470aaaaba217c380aa7eb641709475","score":"0.76756257","text":"public function run()\n {\n //DB::table('reviews')->delete();\n DatabaseSeeder::ClearTable('reviews');\n\n Review::create(\n array('user_id' => '3', 'text' => 'Отличный питомник, грамотные и доброжелательные заводчики!\n Большое спасибо вам за нашу собаку!', 'published' => '0')\n );\n\n Review::create(\n array('user_id' => '3', 'text' => 'Отличный питомник ,все собачки красивые и породные ,чемпионы,\n с хорошим здоровьем . Мы очень довольны выбором .Всем рекомендуем.', 'published' => '1')\n );\n\n }","title":""},{"docid":"520f4a3190cf8cb42f24a3f54f6e405e","score":"0.7672599","text":"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $index ){\n \tDB::table('students')->insert([\n \t\t'first_name'=> $faker->firstName,\n \t\t'last_name'=>$faker->lastName,\n \t\t'date_of_birth'=>$faker->DateTime,\n \t\t'student_id'=>$faker->ean8,\n \t\t'gender'=>$faker->boolean,\n \t\t'phone_number'=>$faker->randomDigit,\n \t\t'email'=> $faker->email,\n \t\t'semester'=>$faker->randomDigit,\n \t\t'class'=>$faker->sentence\n\n \t\t]);\n }\n // $this->call(StudentsTableSeeder::run());\n }","title":""},{"docid":"390fa29c1c99b4bb24ad7a2b512bf966","score":"0.7671107","text":"public function run()\n {\n // $this->call(RoleSeeder::class);\n // $this->call(PermissionSeeder::class);\n // $this->call(UserSeeder::class);\n $user = User::factory()->create(['name' => 'Jhon Snow']);\n $user2 = User::factory()->create(['name' => 'Cthulhu Doe']);\n $user3 = User::factory()->create(['name' => 'Alsina Dimitresku']);\n $user4 = User::factory()->create(['name' => 'Master']);\n $user5 = User::factory()->create(['name' => 'General', 'email' => 'general@mail.ru', 'password' => 'general']);\n $category = Category::factory()->create(['name' => 'War']);\n $category2 = Category::factory()->create(['name' => 'Magic']);\n $category3 = Category::factory()->create(['name' => 'Villages']);\n\n Post::factory(5)->create(['user_id' => $user->id, 'category_id' => $category->id]);\n Post::factory(5)->create(['user_id' => $user2->id, 'category_id' => $category2->id]);\n Post::factory(3)->create(['user_id' => $user2->id, 'category_id' => $category3->id]);\n Post::factory(6)->create(['user_id' => $user3->id, 'category_id' => $category3->id]);\n Post::factory(3)->create(['user_id' => $user4->id, 'category_id' => $category->id]);\n Post::factory(2)->create(['user_id' => $user4->id, 'category_id' => $category2->id]);\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\n\n }","title":""},{"docid":"e9fa3efca175f7f31cd9e7dbd866e396","score":"0.7670872","text":"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n ['role_id' => '1', 'name' => 'admin', 'email' => 'admin@lms.com', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\n ['role_id' => '2', 'name' => 'teacher', 'email' => 'teacher@lms.com', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\n ]);\n\n DB::table('roles')->insert([\n ['name' => 'Teacher'], \n ['name' => 'Admin'],\n ['name' => 'Staff'],\n ['name' => 'accountant'],\n ]);\n\n DB::table('days')->insert([\n ['day' => 'Satarday'],\n ['day' => 'Sunday'],\n ['day' => 'Monday'],\n ['day' => 'Tuesday'],\n ['day' => 'Wednesday'],\n ['day' => 'Thusday'],\n ['day' => 'Friday'],\n ]);\n\n // DB::table('periods')->insert([\n // ['name' => 'Period 1'],\n // ['name' => 'Period 2'],\n // ['name' => 'Period 3'],\n // ['name' => 'Period 4'],\n // ['name' => 'Period 5'],\n // ['name' => 'Period 6'],\n // ['name' => 'Period 7'],\n // ]);\n\n DB::table('school_classes')->insert([\n ['name' => 'One'],\n ['name' => 'Two'],\n ['name' => 'Three'],\n ['name' => 'Four'],\n ['name' => 'Five'],\n ['name' => 'Six'],\n ['name' => 'Seven'],\n ]);\n }","title":""},{"docid":"89ec7e3fec2adf84109c14670c573096","score":"0.7670576","text":"public function run()\n {\n \\App\\Models\\Titre::factory(40)->create();\n \\App\\Models\\Resume::factory(10)->create();\n\n\n $this->call([\n CoordonneeSeeder::class,\n StatistiquesSeeder::class,\n CompetenceSeeder::class,\n PhotoSeeder::class\n ]);\n }","title":""},{"docid":"3b2a01f87307d1f6a7c835e40ee5ee65","score":"0.76704764","text":"public function run()\n {\n $books = json_decode(file_get_contents(database_path().'/seedData/books.json'), True);\n\n foreach ($books as $title => $book) {\n Book::create([\n 'title' => $title,\n 'author' => $book['author'],\n 'year_published' => $book['year_published'] ?? null,\n 'image_url' => $book['image_url'] ?? null,\n ]);\n }\n }","title":""},{"docid":"7ccc15187b4ea3c508675a1b9719d8ce","score":"0.76691145","text":"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\Models\\Office::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n //Populate offices table\n $manypopulate = 50;\n\n for($i= 0; $i < $manypopulate; $i++){\n \\App\\Models\\Office::create([\n 'name' => $faker->sentence,\n 'address' => $faker->sentence,\n ]);\n }\n\n }","title":""},{"docid":"91c9b2e508b7a00cf3618bc6f31b7019","score":"0.7667186","text":"public function run()\n {\n\n /** @var \\Faker\\Generator $faker */\n $faker = App::make(Faker\\Generator::class);\n\n \\DB::statement(\"SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\");\n\n $this->clearTable(\"buyers\");\n $this->clearTable(\"sellers\");\n $this->clearTable(\"estates\");\n $this->clearTable(\"agents\");\n $this->clearTable(\"users\");\n $this->clearTable(\"agent_estate\");\n $this->clearTable(\"orders\");\n $this->clearTable(\"proposals\");\n\n \\DB::statement(\"SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\");\n\n $this->command->comment(\"Seeding users\");\n factory(\\App\\User::class, 200)->create();\n\n $buyers = \\App\\User::where('user_type', 0)->get();\n $sellers = \\App\\User::where('user_type', 1)->get();\n $agents = \\App\\User::where('user_type', 2)->get();\n\n $this->command->comment(\"Seeding buyer\");\n foreach ($buyers as $buyer) {\n /** @var \\App\\Buyer $instance */\n $instance = new \\App\\Buyer;\n $instance->user_id = $buyer->id;\n $instance->save();\n }\n\n $this->command->comment(\"Seeding agent\");\n foreach ($agents as $agent) {\n /** @var \\App\\Agent $instance */\n $instance = new \\App\\Agent;\n $instance->user_id = $agent->id;\n $instance->title = $faker->company;\n $instance->fee = $faker->numberBetween(10000, 200000) / 100;\n $instance->description = $faker->paragraph;\n $instance->save();\n }\n\n $this->command->comment(\"Seeding seller\");\n\n\n foreach ($sellers as $seller) {\n $is_verified = 1 - intval($faker->numberBetween(0, 7) / 5);\n /** @var \\App\\Seller $instance */\n $instance = new \\App\\Seller;\n $instance->user_id = $seller->id;\n $instance->verified = $is_verified;\n $instance->verified_by_agent_id = $is_verified ? App\\Helpers\\Util::randomArrayMember($agents)->id : null;\n $instance->id_card_num = strval($faker->randomNumber(8)) . strval($faker->randomNumber(8));\n $instance->save();\n }\n\n\n $this->command->comment(\"Seeding estates\");\n factory(\\App\\Estate::class, 500)->create();\n\n $this->command->comment(\"Run php artisan seed:relations\");\n return;\n }","title":""},{"docid":"355839e7a0c00a26ac93a195a1884fe3","score":"0.76666796","text":"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // Blog::factory(15)->create();\n\n User::factory(15)\n ->create()\n ->each(function ($user) {\n Blog::factory(random_int(2, 5))\n ->seeding()\n ->create(['user_id' => $user])\n ->each(function ($blog) {\n Comment::factory(random_int(1, 3))->create(['blog_id' => $blog]);\n });\n });\n }","title":""},{"docid":"185338e2242eb2e25db37e4fd2d6c989","score":"0.7666168","text":"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Membresia::truncate();\n\n // Initialize the Faker package. We can use several different locales for it, so\n // let's use the german locale to play with it.\n $faker = \\Faker\\Factory::create('es_ES');\n\n // And now, let's create a few articles in our database:\n for ($i = 1; $i < 30; $i++) {\n Membresia::create([\n 'name' => $faker->name,\n 'dni' => $faker->randomNumber(5),\n 'role' => $faker->name (),\n 'status' => $faker->name (),\n ]);\n }\n\n }","title":""},{"docid":"b51f9ef314a6dd780dd083daea1bf1f0","score":"0.7664776","text":"public function run()\n {\n \t$faker= Faker::create();\n\n \t$canino_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Canino')\n ->first()\n ->id;\n\n $felino_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Felino')\n ->first()\n ->id;\n $ave_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Ave')\n ->first()\n ->id; \n\n \t$estatus_activo= DB::table('estatus')\n ->select('id')\n ->where('nombre', 'activo')\n ->first()\n ->id;\n \tfor($i=0; $i<10; $i++){\n\n \t\t\\DB::table('animal')->insert(array(\n \t'idespecie' => $faker->randomElement([$canino_role,$felino_role,$ave_role]),\n \t'idestatususuario' => $estatus_activo,\n \t'nombre' => $faker->firstName,\n \t'comentario'=>$faker->paragraph($nbSentences = 3)\n \t));\t\n \t}\n }","title":""},{"docid":"b97070b0b16872dc6d136f9070202aec","score":"0.7661721","text":"public function run()\n\t{\n\t\t//DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\t\t/* Linea::truncate();\n\t\tPedido::truncate();\n EstadoPedido::truncate();\n\t\tRepresentante::truncate();\n\t\tLibroAutor::truncate();\n\t\tLibro::truncate();\n\t\tAutor::truncate();\n\t\tTipoEdicion::truncate();\n\t\tGenero::truncate();\n\t\tNivel::truncate(); */\n\t\t$this->call(UsersTableSeeder::class);\n\t\tfactory(EditorialWeb\\User::class, 10)->create();\n\t\tfactory(EditorialWeb\\Post::class, 50)->create();\n\t\t\n\t\t$this->call(CategoriaSeeder::class);\n\t\t\n\t\t$this->call(NivelesSeeder::class);\n\t\t$this->call(TipoEdicionesSeeder::class);\n\t\t$this->call(AutoresSeeder::class);\n\t\t$this->call(GenerosSeeder::class);\n\t\t$this->call(LibrosSeeder::class);\n\t\t$this->call(LibroAutoresSeeder::class);\n\t\t$this->call(RepresentantesSeeder::class);\n $this->call(EstadoPedidosSeeder::class);\n\t $this->call(PedidosSeeder::class);\n\t\t$this->call(LineasSeeder::class);\n\t\t\n\n\t}","title":""},{"docid":"3bacf019e0a7bd2d72ff258166f87982","score":"0.7661143","text":"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'user@gmail.com',\n 'password' => bcrypt('password'),\n 'role'=>'Administrador'\n ]);\n DB::table('functionms')->insert([\n ['title' => 'Função 1'],\n ['title' => 'Função 2'],\n ['title' => 'Função 3'],\n ['title' => 'Função 4'],\n ['title' => 'Função 5']\n ]);\n DB::table('processes')->insert([\n ['title' => 'Processo 1', 'color' => '#333333'],\n ['title' => 'Processo 2', 'color' => '#ff5500'],\n ['title' => 'Processo 3', 'color' => '#005533'],\n ['title' => 'Processo 4', 'color' => '#ff9922'],\n ['title' => 'Processo 5', 'color' => '#bb52f1']\n ]);\n DB::table('setor')->insert([\n 'name'=>'TI',\n 'descricao'=>'Apenas um seed para testes'\n ]);\n DB::table('cargo')->insert([\n 'name'=>'Desenvolvedor',\n 'resumo'=>'Apenas um seed para testes',\n 'descricao'=>'Apenas um seed para testes'\n ]);\n }","title":""},{"docid":"858e059a01a752d81019e1020e108284","score":"0.76584333","text":"public function run()\n {\n // Department\n foreach(['Generate Emp'] as $name)\n {\n $department = Department::create([\n 'name' => $name,\n 'active' => true,\n ]);\n\n foreach(range(1, rand(10, 35)) as $index)\n {\n // Employee\n $employee = Employee::create([\n 'username' => $faker->companyEmail(),\n 'password' => bcrypt('qweasd'),\n 'firstname' => $faker->firstName(),\n 'lastname' => $faker->lastName(),\n 'can_login' => true,\n 'active' => true,\n 'department_id' => $department->id,\n 'position_id' => Position::orderByRaw(\"RAND()\")->first()->id\n ]);\n\n // Permission\n Permission::create([\n 'role_id' => Role::where('name', 'general')->first()->id,\n 'employee_id' => $employee->id\n ]);\n }\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"5276fa926c7c0e25eef6eaa079aab740\",\n \"score\": \"0.8033761\",\n \"text\": \"public function run()\\n\\t{\\n\\t\\t// $this->call('UsersTableSeeder');\\n\\n\\t\\t// Truncamos los datos de los modelos y insertamos de nuevo en cada seed\\n\\t\\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\\n\\t\\tEstudiante::truncate();\\n\\t\\tCurso::truncate();\\n\\t\\tProfesor::truncate();\\n\\t\\tDB::table('curso_estudiante')->truncate();\\n\\n\\t\\tfactory(Profesor::class, 50)->create();\\n\\t\\tfactory(App\\\\Profesor::class)->create([\\n 'nombre' => 'Heisenberg',\\n 'email' => 'heisenberg@breakingbad.com',\\n 'password' => password_hash('pass', PASSWORD_BCRYPT)\\n ]);\\n\\t\\tfactory(Estudiante::class, 500)->create();\\n\\n\\t\\tfactory(Curso::class, 40)\\n\\t\\t\\t->create()\\n\\t\\t\\t->each(function($curso){\\n\\t\\t\\t\\t$curso\\n\\t\\t\\t\\t\\t->estudiantes()\\n\\t\\t\\t\\t\\t->attach( array_rand(range(1, 500), 40) );\\n\\t\\t\\t});\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0269eae890ef3ba6d0757e56d65e0856\",\n \"score\": \"0.8006915\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n $categories = factory(App\\\\Category::class, 25)->create();\\n foreach ($categories as $category) {\\n $products = factory(App\\\\Product::class, random_int(1, 50))->create(['category_id' => $category->id]);\\n foreach ($products as $product) {\\n factory(App\\\\Variant::class, random_int(0, 50))->create(['product_id' => $product->id]);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8aa803bb2ba2d917839552e0913e299d\",\n \"score\": \"0.8006357\",\n \"text\": \"public function run()\\n {\\n\\n $faker = Faker::create();\\n\\n foreach (range(1,100) as $index) {\\n \\tApp\\\\Model\\\\Author::create([\\n \\t\\t'name' => $faker->name,\\n \\t]);\\n }\\n\\n \\tforeach (range(1,100) as $index) {\\n \\tApp\\\\Model\\\\Publisher::create([\\n \\t\\t'name' => $faker->company,\\n \\t]);\\n }\\n\\n $authors = Author::where('id', '>', 0)->pluck('id')->toArray();\\n $publishers = Publisher::where('id', '>', 0)->pluck('id')->toArray();\\n\\n foreach (range(1,100) as $index) {\\n \\t\\t\\tApp\\\\Model\\\\Book::create([\\n \\t\\t'ISBN' => $faker->ean13,\\n \\t\\t'title' => $faker->name,\\n \\t\\t'date' => $faker->date,\\n \\t\\t'author_id' => $faker->randomElement($authors),\\n \\t\\t\\t'publisher_id' => $faker->randomElement($publishers), \\t\\t\\n \\t]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e039b35d9c938323e41faa91de018499\",\n \"score\": \"0.8004494\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n Book::create([\\n 'user_id'=> 1,\\n 'author_id'=>1,\\n 'title'=> 'Harry Potter',\\n 'cover'=> 'http://bookriotcom.c.presscdn.com/wp-content/uploads/2014/08/HP_pb_new_1.jpg'\\n ]);\\n\\n Book::create([\\n 'user_id'=> 1,\\n 'author_id'=>1,\\n 'title'=> 'Kamasutra',\\n 'cover'=> 'https://img1.od-cdn.com/ImageType-400/3363-1/AB1/79E/D3/%7BAB179ED3-D42C-4135-9102-875ABA350C0E%7DImg400.jpg'\\n ]);\\n\\n Book::create([\\n 'user_id'=> 1,\\n 'author_id'=>1,\\n 'title'=> 'THUG kitchen',\\n ]);\\n\\n Author::create([\\n 'name'=> 'Testing Author',\\n 'year_of_birth'=> '1972',\\n ]);\\n\\n User::create([\\n 'name'=>'Matej',\\n 'email'=>'matpolak@seznam.cz',\\n 'password'=> '$2y$10$ApgqGBJE9dnxIyqa/Csb0.UntecIvpr08K78KvMEN497F25wde1D2'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c84c48444e4e3992123a987e00590d97\",\n \"score\": \"0.7986877\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n \\n User::create([\\n 'name' => 'Admin',\\n 'email' => 'admin@admin.com',\\n 'password' => bcrypt('secret'),\\n 'is_admin' => true,\\n 'status' => true,\\n 'reputation'=> '100'\\n ]);\\n\\n User::create([\\n 'name' => 'Demo User',\\n 'email' => 'demo@user.com',\\n 'password' => bcrypt('secret'),\\n 'is_admin' => false,\\n 'status' => true,\\n 'reputation'=> '10'\\n ]);\\n\\n factory(App\\\\Model\\\\Question::class, 100)->create();\\n factory(App\\\\Model\\\\Answer::class, 250)->create();\\n factory(App\\\\Model\\\\Tag::class, 50)->create();\\n factory(App\\\\Model\\\\Comment::class, 50)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09eb34b0e1c7c9b0454596554413da5b\",\n \"score\": \"0.7947502\",\n \"text\": \"public function run()\\n {\\n DB::table('users')->insert([\\n 'name' => 'Admin',\\n 'email' => 'admin@gmail.com',\\n 'password' => Hash::make('123'),\\n ]);\\n\\n $faker = Faker::create('lt_LT'); //statinis metodas\\n $authors=10;\\n $publishers=10;\\n\\n foreach(range(1, $authors) as $_) {\\n DB::table('authors')->insert([\\n 'name' => $faker->firstName(),\\n 'surname' => $faker->lastName()\\n ]);\\n }\\n\\n foreach(range(1, $publishers) as $_) {\\n DB::table('publishers')->insert([\\n 'title' => $faker->company(),\\n ]);\\n }\\n\\n foreach(range(1, 100) as $_) {\\n DB::table('books')->insert([\\n 'title' => str_replace(['.', '\\\"', \\\"'\\\", ')', '(' ], '', $faker->realText(rand(10, 30))),\\n 'isbn' => $faker->isbn13(),\\n 'pages' => rand(22, 550),\\n 'about' => $faker->realText(500, 4),\\n 'author_id' => rand(1, $authors),\\n 'publisher_id' => rand(1, $publishers),\\n ]);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99b2d608440f609ad0ec4b7fe078bfbe\",\n \"score\": \"0.79405534\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n //factory(App\\\\Article::class, 5)->create();\\n DB::table('articles')->insert([\\n 'name' => 'Ami N.O.',\\n 'description' => 'BCAA for enhanced working out',\\n 'provider' => 'Optimum Nutrition',\\n 'rating' => 4.2,\\n ]);\\n DB::table('articles')->insert([\\n 'name' => 'Quadra Lean',\\n 'description' => 'Weight management ',\\n 'provider' => 'RSP Nutrition',\\n 'rating' => 4.6,\\n ]);\\n DB::table('articles')->insert([\\n 'name' => 'Combat Whey',\\n 'description' => 'Whey Protein for muscle building',\\n 'provider' => 'MusclePharm',\\n 'rating' => 4.3,\\n ]);\\n DB::table('articles')->insert([\\n 'name' => 'Amino Lean',\\n 'description' => 'Weight management ',\\n 'provider' => 'RSP Nutrition',\\n 'rating' => 4.6,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b353a26c6a30fe5cf356c5d5581c8672\",\n \"score\": \"0.7884981\",\n \"text\": \"public function run()\\n {\\n //$this->call(UserSeeder::class);\\n DB::table('users')->insert([\\n 'name' => \\\"teste\\\",\\n 'email' => \\\"teste@gmail.com\\\",\\n 'password' => Hash::make('123456'),\\n ]);\\n\\n DB::table('states')->insert([\\n 'nome' => \\\"ativo\\\",\\n 'states_id' => 1,\\n ]);\\n\\n DB::table('states')->insert([\\n 'nome' => \\\"baixado\\\",\\n 'states_id' => 2,\\n ]);\\n\\n DB::table('produtos')->insert([\\n\\n 'states_id'=>1,\\n 'nome'=> \\\"teste\\\",\\n 'sku'=> 43,\\n 'quantidade'=> 200,\\n 'descricao'=>\\\"testando\\\"\\n ]);\\n \\n DB::table('produtos')->insert([\\n 'states_id'=>2,\\n 'nome'=> \\\"teste2\\\",\\n 'sku'=> 44,\\n 'quantidade'=> 400,\\n 'descricao'=>\\\"testando2\\\"\\n ]);\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be8184a1d867e9407161f68458384472\",\n \"score\": \"0.7878122\",\n \"text\": \"public function run()\\n {\\n // Truncate our existing records to start from scratch.\\n Participant::truncate();\\n\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n // And now, let's create a few articles in our database:\\n for ($i = 0; $i < 50; $i++) {\\n Participant::create([\\n 'name' => $faker->name,\\n 'age' => $faker->numberBetween(1,99),\\n 'dob' => now(),\\n 'profession' => $faker->randomElement($array = array ('Employed','Student')),\\n 'locality' => $faker->city,\\n 'no_of_guests' => $faker->numberBetween(0,2),\\n 'address' => $faker->address\\n ]);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c49c4c393bd62d7155e7274754b4a404\",\n \"score\": \"0.78720385\",\n \"text\": \"public function run()\\n {\\n DB::table('users')->insert([\\n 'name' => 'Martijn Brands',\\n 'email' => 'martijn@portfolio.nl',\\n 'password' => bcrypt('4&Q5Vhgh6H6+c_=%')\\n ]);\\n\\n \\t$faker = Faker\\\\Factory::create();\\n \\tfor ($i=0; $i < 10; $i++) {\\n\\n $title = $faker->sentence;\\n\\n DB::table('posts')->insert([\\n 'title' => $title,\\n 'description' => $faker->text($maxNbChars = 600),\\n 'color' => $faker->hexcolor,\\n 'textColor' => $faker->hexcolor,\\n 'slug' => str_slug($title)\\n ]);\\n }\\t\\n\\t \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58993d8340037bf0991b33dfd6a9f8a3\",\n \"score\": \"0.7869335\",\n \"text\": \"public function run()\\n {\\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\\n // Let's truncate our existing records to start from scratch.\\n Review::truncate();\\n\\n $faker = \\\\Faker\\\\Factory::create();\\n \\n // And now, let's create a few articles in our database:\\n for ($j=0; $j < 10; $j++) { \\n for ($i = 1; $i < 6; $i++) {\\n Review::create([\\n 'score' => $faker->numberBetween(1,5),\\n 'buyer_id' => $i,\\n 'seller_id' => $i+6,\\n 'ad_id' => $faker->numberBetween(0,10),\\n ]);\\n } \\n }\\n \\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c20ba6fe5501ce36869c85d940b8092\",\n \"score\": \"0.7867347\",\n \"text\": \"public function run()\\n {\\n $this->call(PackageTableSeeder::class);\\n $this->call(ProductTableSeeder::class);\\n\\n \\\\App\\\\Contact::create([\\n 'name' => 'Herman Nelissen',\\n 'email' => 'hsfnelissen@gmail.com',\\n 'created_at' => '2018-10-28 21:35:27',\\n 'updated_at' => '2018-10-28 21:35:27'\\n ]);\\n\\n \\\\App\\\\Quote::create([\\n 'total_price' => 2300,\\n 'students' => 500,\\n 'product_id' => 1,\\n 'contact_id' => 1,\\n 'created_at' => '2018-10-28 21:35:27',\\n 'updated_at' => '2018-10-28 21:35:27'\\n ]);\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d45ae2c2a40bb81109d9488190d4318\",\n \"score\": \"0.7853057\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\t\\t\\t$users = factory(App\\\\User::class)->times(15)->create();\\n $categories = factory(App\\\\Category::class)->times(10)->create();\\n\\t\\t\\t$products = factory(App\\\\Product::class)->times(30)->create();\\n\\n foreach ($users as $user){\\n if ($user->country == 'Argentina'){\\n $user->state='Buenos Aires';\\n }\\n }\\n\\n\\t\\t\\tforeach ($products as $oneProduct) {\\n\\t\\t\\t\\t$oneProduct->user()->associate($users->random(1)->first()->id);\\n\\t\\t\\t\\t$oneProduct->category()->associate($categories->random(1)->first()->id);\\n\\t\\t\\t\\t$oneProduct->save();\\n\\t\\t\\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f671912fdabef612f6e0b6f0478edaa\",\n \"score\": \"0.78516454\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n factory(App\\\\Question::class, 10)->create()->each(function($q) {\\n foreach (range(1,5) as $index) {\\n $q->answers()->save(factory(App\\\\Answer::class)->make());\\n }\\n foreach (range(1,5) as $index) {\\n $q->tags()->save(factory(App\\\\Tag::class)->make());\\n }\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be492c3a599cee49a50ba5a60ed47020\",\n \"score\": \"0.78504646\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n factory(\\\\App\\\\User::class)->create([\\n 'email' => 'admin@demo.com',\\n 'password' => bcrypt('secret')\\n ]);\\n\\n factory(\\\\App\\\\Category::class, 5)->create(['parent_id' => 0]);\\n factory(\\\\App\\\\Category::class, 10)->create();\\n factory(\\\\App\\\\Post::class,20)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15513b06c4d4867be88d5dd7093d46be\",\n \"score\": \"0.7843203\",\n \"text\": \"public function run()\\n {\\n User::create([\\n 'name' => 'Admin',\\n 'email' => 'admin@example.co',\\n 'password' => bcrypt('password'),\\n 'role' => User::ROLE_ADMIN\\n ]);\\n \\\\Factory(User::class, 20)->create();\\n \\\\Factory(Instructor::class, 5)->create();\\n \\\\Factory(Student::class, 10)->create();\\n \\\\Factory(Course::class, 10)->create();\\n \\\\Factory(Content::class, 50)->create();\\n \\\\Factory(Question::class, 10)->create();\\n \\\\Factory(Answer::class, 50)->create();\\n\\n foreach(Student::all() as $student) {\\n $student->courses()->save(Course::all()->random());\\n $student->courses()->save(Course::all()->random());\\n }\\n\\n \\\\Factory(Chat::class, 50)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca425680dd8b66e53a9919f358b1bcd1\",\n \"score\": \"0.78391004\",\n \"text\": \"public function run()\\n {\\n // Let's truncate our existing records to start from scratch.\\n rutes::truncate();\\n\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n // And now, let's create a few articles in our database:\\n for ($i = 0; $i < 10; $i++) {\\n \\trutes::create([\\n \\t\\t'idrutes' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\\n \\t\\t'rutnom' => $faker->sentence($nbWords = 3),\\n \\t\\t'rutcreador' => $faker->name,\\n \\t\\t'rutmida' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\\n \\t\\t'rutlocals' => $faker->sentences($nb = 3, $asText = false),\\n \\t\\t'rutdescripcio' => $faker->text($maxNbChars = 200),\\n \\t\\t'rutdata' => $faker->date,\\n \\t\\t'rutvaloracio' => $faker->numberBetween($min = 1, $max = 5),\\n \\t]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22dfeb9cc91c700525ce667bb7f0c0b5\",\n \"score\": \"0.7837788\",\n \"text\": \"public function run()\\n {\\n $this->faker = Faker\\\\Factory::create();\\n $this->emptyDatabase();\\n $this->seedContacts();\\n $this->seedProjects();\\n $this->seedContactProjects();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d21aeeff6e058edf6d416a1730ee9a3\",\n \"score\": \"0.78370357\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\t\\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\\n\\t\\tDB::table('authors')->truncate();\\n\\t\\tDB::table('books')->truncate();\\n\\t\\tDB::table('publishers')->truncate();\\n\\t\\tDB::table('book_publisher')->truncate();\\n\\t\\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\\n\\t\\t\\n\\t\\tfor ($recordNb = 1; $recordNb <= 10; $recordNb++) {\\n\\t\\t\\tDB::table('book_publisher')->insert(\\n\\t\\t\\t\\t[\\n\\t\\t\\t\\t\\t'book_id' => factory(App\\\\Book::class)->create()->id,\\n\\t\\t\\t\\t\\t'publisher_id' => factory(App\\\\Publisher::class)->create()->id\\n\\t\\t\\t\\t]\\n\\t\\t\\t);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56e384c87eaa6052b3df9ff5b3142a6b\",\n \"score\": \"0.78346497\",\n \"text\": \"public function run()\\n {\\n $faker = Faker::create();\\n\\n foreach(range(1, 30) as $index) {\\n DB::table('users')->insert([\\n 'name' => $faker->name,\\n 'email' => $faker->email,\\n 'password' => bcrypt('secret'),\\n ]);\\n DB::table('products')->insert([\\n 'user_id' => $index,\\n 'brand' => $faker->company,\\n 'name' => $faker->word,\\n 'category' => $faker->word,\\n 'price' => $faker->randomFloat(2, 0, 99999),\\n ]);\\n DB::table('services')->insert([\\n 'user_id' => $index,\\n 'title' => $faker->word,\\n 'category' => $faker->word,\\n 'price' => $faker->randomFloat(2, 0, 99999),\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e32b70fb5531784e31acdad60483f72\",\n \"score\": \"0.7826652\",\n \"text\": \"public function run()\\n {\\n $user = User::create([\\n 'name' => 'user',\\n 'email' => 'user@gmail.com',\\n 'phone' => '089639385477',\\n 'role' => 0,\\n 'password' => Hash::make('user')\\n ]);\\n $categories = Category::all();\\n foreach ($categories as $cat) {\\n Article::create([\\n 'user_id' => $user->id,\\n 'category_id' => $cat->id,\\n 'title' => Faker\\\\Provider\\\\id_ID\\\\Address::state(),\\n 'description' => Faker\\\\Provider\\\\Lorem::text(),\\n 'image' => Faker\\\\Provider\\\\Image::image(public_path('images/'),400,300, null, false)\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b64a5f0743ca2bf1f917364cddd2c87d\",\n \"score\": \"0.78227943\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n DB::table('game_titles')->insert([\\n [\\n 'title' => \\\"ApexLegends\\\",\\n ],\\n [\\n 'title' => \\\"Bloodborne\\\",\\n ],\\n [\\n 'title' => \\\"CallOfDuty\\\",\\n ],\\n ]);\\n DB::table('sns')->insert([\\n [\\n 'name' => \\\"Twitter\\\",\\n 'url' => \\\"a\\\",\\n 'icon' => \\\"https://twitter.com/\\\",\\n ],\\n [\\n 'name' => \\\"youtube\\\",\\n 'url' => \\\"a\\\",\\n 'icon' => \\\"https://YouTube.com/\\\",\\n ],\\n [\\n 'name' => \\\"facebook\\\",\\n 'url' => \\\"a\\\",\\n 'icon' => \\\"https://facebook.com/\\\",\\n ],\\n [\\n 'name' => \\\"instagram\\\",\\n 'url' => \\\"a\\\",\\n 'icon' => \\\"https://instagram.com/\\\",\\n ],\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b35f7b7df0771d4dd8ac3b5b25b0f9ba\",\n \"score\": \"0.78203046\",\n \"text\": \"public function run()\\n {\\n // User::truncate();\\n\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n $gender = $faker->randomElement(['male', 'female']);\\n\\n // And now, let's create a few articles in our database:\\n for ($i = 0; $i < 3; $i++) {\\n User::create([\\n 'email' => $faker->email,\\n 'password' => Hash::make('password'), //$2a$10$sme1juiwmlQ3l/ccoVOwcu4STJvrmdfb/Sjulpbl1rNvBrC6oLDAK\\n 'firstname' => $faker->firstName(),\\n 'lastname' => $faker->lastName,\\n 'age' => $faker->numberBetween(25, 60),\\n 'type' => $gender,\\n 'phone' => $faker->phoneNumber,\\n // 'group_id' => $faker->numberBetween(1, 3)\\n ]);\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f084569c94eacda8d55e19801f815b\",\n \"score\": \"0.78179294\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n // 创建一个用户\\n $user = factory(User::class)->create([\\n 'name' => 'iwanli',\\n 'password' => bcrypt('123123')\\n ]);\\n // 创建四个分类\\n factory(Category::class,4)->create()->each(function($category) use ($user){\\n // 创建10片文章\\n factory(Post::class, 10)->create([\\n 'user_id' => $user->id,\\n 'category_id' => $category->id,\\n ])->each(function($post){\\n // 随机创建2-4个标签\\n factory(Tag::class, rand(2,4))->create()->each(function($tag) use ($post){\\n // 添加文章和标签的关系\\n PostTag::create([\\n 'post_id' => $post->id,\\n 'tag_id' => $tag->id,\\n ]);\\n });\\n });\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48a2b5245515b10dfedf5039d39b4bac\",\n \"score\": \"0.78135884\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n $this->call(ArticleTableSeeder::class);\\n /*\\n Thêm 1 record vào db\\n DB::table('articles')->insert([\\n 'title'=>'ABC',\\n 'content'=>'laia'\\n ]);*/\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"365f1b32ad392fb1faece80c6845ee8a\",\n \"score\": \"0.781312\",\n \"text\": \"public function run()\\n {\\n //$this->call(UsersTableSeeder::class);\\n User::create([\\n \\\"username\\\" => \\\"usuario\\\",\\n \\\"name\\\" => \\\"usuario\\\",\\n \\\"email\\\" => \\\"usuario@usuario.com\\\",\\n \\\"password\\\" => bcrypt(\\\"usuario\\\"),\\n \\\"user_type\\\" => \\\"admin\\\"]);\\n\\n User::create([\\n \\\"username\\\" => \\\"pedro\\\",\\n \\\"name\\\" => \\\"pedro\\\",\\n \\\"email\\\" => \\\"pedro@usuario.com\\\",\\n \\\"password\\\" => bcrypt(\\\"usuario\\\"),\\n \\\"user_type\\\" => \\\"admin\\\"]);\\n\\n\\n Subreddit::create([\\n \\\"creator_id\\\" => 1,\\n \\\"name\\\" => \\\"Games\\\",\\n \\\"description\\\" => \\\"A place to talk about videogames\\\"]);\\n\\n Subscription::create([\\n \\\"user_id\\\" => 2,\\n \\\"subreddit_id\\\" => 1]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75cb62df6863484c158e7bf137af4153\",\n \"score\": \"0.7809263\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\\n\\n User::truncate();\\n Course::truncate();\\n Subject::truncate();\\n\\n $userQuantity \\t\\t= 1000;\\n $courseQuantity \\t= 10;\\n $subjectQuantity \\t= 200;\\n\\n factory(User::class, $userQuantity)->create();\\n factory(Course::class, $courseQuantity)->create();\\n factory(Subject::class, $subjectQuantity)->create()->each(\\n \\tfunction($subject){\\n \\t\\t$courses = Course::all()->random(mt_rand(1,5))->pluck('id');\\n $subject->courses()->attach($courses);\\n \\n $staff = User::all()->random(mt_rand(1,5))->pluck('id');\\n $subject->staffs()->attach($staff);\\n \\n $student = User::all()->random(mt_rand(1,5))->pluck('id');\\n $subject->students()->attach($student);\\n });\\n\\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f26a02b92952342b834fb9336b7495c\",\n \"score\": \"0.78090334\",\n \"text\": \"public function run()\\n {\\n Eloquent::unguard();\\n\\n $truncate = [\\n 'users',\\n 'products',\\n 'reviews',\\n ];\\n // To remove previous data from database\\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\\n foreach ($truncate as $table) {\\n DB::table($table)->truncate();\\n }\\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\\n\\n // $this->call(UsersTableSeeder::class);\\n\\n factory(App\\\\User::class,5)->create();\\n factory(App\\\\Model\\\\Product::class,50)->create();\\n factory(App\\\\Model\\\\Review::class,50)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95e059a4616f6c77fd9ef5fb8646df09\",\n \"score\": \"0.78027606\",\n \"text\": \"public function run()\\n {\\n $faker = Faker::create('App\\\\Models\\\\News');\\n\\n // Creating 10 dummy news with users in the DB\\n for ($i=0; $i < 10; $i++) {\\n DB::table('news')->insert([\\n 'title'=> $faker->sentence($nbWords = 6, $variableNbWords = true),\\n 'content'=> $faker->text($maxNbChars = 200),\\n // making new user everytime a new news is made via seeder\\n 'user_id'=> User::factory()->create()->id,\\n 'updated_at' => now(),\\n 'created_at' => now(),\\n ]);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7576af445bb78ab6c07c30e0d6047f27\",\n \"score\": \"0.7797619\",\n \"text\": \"public function run()\\n {\\n // \\\\App\\\\Models\\\\User::factory(1)->create();\\n \\\\App\\\\Models\\\\User::create([\\n 'username'=>'admin',\\n 'nickname'=>'John Doe',\\n 'password'=>\\\\bcrypt('123456'),\\n ]);\\n\\n \\\\App\\\\Models\\\\Article::factory()->times(5)->create();\\n\\n \\\\App\\\\Models\\\\Comment::factory()->times(5)->create();\\n\\n \\\\App\\\\Models\\\\Feedback::factory()->times(5)->create();\\n\\n \\\\App\\\\Models\\\\Category::create([\\n 'name'=>'历史',\\n 'parent_id'=>0\\n\\n ]);\\n\\n $this->call([\\n SettingSeeder::class,\\n ]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9ff49d78b82f3a74d3064b1e540bf86\",\n \"score\": \"0.77963626\",\n \"text\": \"public function run()\\n {\\n \\\\App\\\\Models\\\\User::factory(1)->create();\\n\\n // $this->call(ArticleTableSeeder::class);\\n $this->call(ArticlesTableSeeder::class);\\n\\n DB::table('articles')->insert([\\n 'title' => Str::random(50),\\n 'body' => Str::random(50),\\n ]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"476cadcd72726378c148f07886c0964c\",\n \"score\": \"0.7794292\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n // Administrator\\n $administrator = factory(\\\\App\\\\User::class)->create(['email' => 'administrator@mr.com', 'role' => 'ADMINISTRATOR']);\\n\\n // Customer Model\\n $customerUser = factory(\\\\App\\\\User::class)->create(['email' => 'customer@mr.com', 'role' => 'CUSTOMER']);\\n $customer = factory(\\\\App\\\\Customer::class)->create(['user_id' => $customerUser->id]);\\n\\n // Products\\n for ($i=0; $i < 5; $i++) {\\n $productCategory = factory(\\\\App\\\\ProductCategory::class)->create();\\n $product = factory(\\\\App\\\\Product::class)->create();\\n $product->productCategories()->sync([$productCategory->id]);\\n }\\n\\n // Delivery Fees\\n factory(\\\\App\\\\DeliveryFee::class)->create(['from' => 0, 'to' => 3, 'fee' => 50]);\\n factory(\\\\App\\\\DeliveryFee::class)->create(['from' => 3, 'to' => 6, 'fee' => 75]);\\n factory(\\\\App\\\\DeliveryFee::class)->create(['from' => 6, 'to' => 9, 'fee' => 100]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da9353a2cd732b4fd068cbe28b73cbcc\",\n \"score\": \"0.7791213\",\n \"text\": \"public function run()\\n {\\n // \\\\App\\\\Models\\\\User::factory(10)->create();\\n $this->call(TacticSeeder::class);\\n $this->call(UserSeeder::class);\\n\\n $courses = Course::with('users')->get();\\n\\n foreach ($courses as $course) {\\n $exercises = Exercise::factory()->count(8)->create(['user_id' => $course->user_id]);\\n foreach ($exercises as $exercise) {\\n $exercise->courses()->attach($course->id);\\n $exercise->tactics()->attach(Tactic::all()->random()->id);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06d0f251e5b64ba99e07b28c19b0f866\",\n \"score\": \"0.7789426\",\n \"text\": \"public function run()\\n {\\n\\n $roles = ['Admin', 'Teacher', 'Student'];\\n foreach ($roles as $role) {\\n \\\\App\\\\Models\\\\Role::create([\\n 'title' => $role\\n ]);\\n }\\n\\n $subjects = ['English', 'Math', 'Physics', 'Computer'];\\n foreach ($subjects as $subject) {\\n \\\\App\\\\Models\\\\Subject::create([\\n 'title' => $subject\\n ]);\\n }\\n\\n $levels = ['Primary', 'Elementary', 'Secondary', 'High'];\\n foreach ($levels as $level) {\\n \\\\App\\\\Models\\\\Level::create([\\n 'title' => $level\\n ]);\\n }\\n\\n // $this->call(UsersTableSeeder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e30615d54a3a5cf829c10d31a5c04f7\",\n \"score\": \"0.77874225\",\n \"text\": \"public function run()\\n {\\n $this->call(PermissionsTableSeeder::class);\\n $this->call(UsersTableSeeder::class);\\n $this->call(ProductsTableSeeder::class);\\n\\n factory(App\\\\Curso::class, 5)->create();\\n\\n factory(App\\\\Alumno::class, 10)->create()->each(function(App\\\\Alumno $alumno){\\n //se relaciona un post con un tag\\n $alumno->cursos()->attach([\\n rand(1,5), //el primer post se relaciona con las primeras cinco etiquetas\\n \\n \\n ]);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c8fed78f76fb9e1e482206dd1ea48d5\",\n \"score\": \"0.7786723\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n $this->call(LaratrustSeeder::class);\\n\\t\\tDB::table('settings')->insert(\\n array('name' => 'College of Engineering ', 'dean' => 'De Vera, Angel V. Jr.')\\n );DB::table('sections')->insert(\\n array('name' => 'EC-4-1')\\n );DB::table('courses')->insert(\\n array('name' => 'ECE')\\n );DB::table('subjects')->insert(\\n array('name' => 'ECE-525a', 'description' => 'industrial electronics')\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc3f4e5598777e48341bac775cb1fb7f\",\n \"score\": \"0.77851945\",\n \"text\": \"public function run()\\n {\\n // create an instance of Faker class to the variable $faker\\n $faker = Faker::create();\\n\\n // get all existing user ids into a $users array\\n $users = User::all()->pluck('id')->toArray();\\n\\n // generate 100 records for the animals table\\n foreach (range(1,100) as $index){\\n DB::table('animals')->insert([\\n //'id'=>$faker->randomNumber($nbDigits = 7, $strict = false),\\n 'userid' => 5,\\n 'name' =>$faker->firstName(),\\n 'birth_year' =>$faker->year($max = 'now'),\\n 'description'=>$faker->sentence($nbWords = 6, $variableNbWords = true),\\n 'type_of_pet'=>$faker->randomElement($array=array('cat','dog','bird',\\n 'rabbit', 'horse','ferret',\\n 'fish', 'rat/mice',\\n 'amphibian','reptile')),\\n 'is_available' => 1,\\n 'created_at' => now()\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6419861cc2705b3341ba36acf9522390\",\n \"score\": \"0.7782119\",\n \"text\": \"public function run()\\n {\\n Model::unguard();\\n\\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\\n DB::table('users')->truncate();\\n DB::table('posts')->truncate();\\n DB::table('comments')->truncate();\\n\\n factory(App\\\\User::class, 5)->create()->each(function($user){\\n factory(App\\\\Post::class, random_int(1, 5))->create([\\n 'post_author' => $user->id\\n ]);\\n\\n factory(App\\\\Comment::class, random_int(1,5))->create([\\n 'comment_author' => $user->id,\\n 'post_id' => random_int(1,5)\\n ]);\\n });\\n\\n \\\\App\\\\User::create([\\n 'name' => 'writer',\\n 'username' => 'writer',\\n 'email' => 'writer@example.com',\\n 'password' => Hash::make('password'),\\n 'remember_token' => str_random(10)\\n ])->save();\\n\\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\\n\\n Model::reguard();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78cc789dd6e437818d7cdb71821fa4b4\",\n \"score\": \"0.77758443\",\n \"text\": \"public function run()\\n\\t{\\n\\t\\tModel::unguard();\\n\\n\\t\\t$faker = Faker\\\\Factory::create();\\n\\n\\t\\tDB::table('companies')->truncate();\\n\\t\\tDB::table('employees')->truncate();\\n\\n\\t\\tfor ($i=0; $i < 100; $i++) {\\n\\t\\t\\t$company = Company::create([\\n\\t\\t\\t\\t'name' => $faker->company,\\n\\t\\t\\t\\t'business' => $faker->bs\\n\\t\\t\\t]);\\n\\t\\t\\tfor ($j=0; $j < 50; $j++) {\\n\\t\\t\\t\\tEmployee::create([\\n\\t\\t\\t\\t\\t'company_id' => $company->id,\\n\\t\\t\\t\\t\\t'name' => $faker->name,\\n\\t\\t\\t\\t\\t'job_title' => $faker->sentence(3),\\n\\t\\t\\t\\t\\t'phone' => $faker->phoneNumber,\\n\\t\\t\\t\\t\\t'email' => $faker->email,\\n\\t\\t\\t\\t]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// $this->call('UserTableSeeder');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1b6a34aec59e70ff9fc40ff23f7adc0\",\n \"score\": \"0.77758276\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n DB::table('collection_list')->insert([\\n 'name' => 'Sprint 2020',\\n 'created_at' => date('Y-m-d H:i:s'),\\n 'updated_at' => date('Y-m-d H:i:s'),\\n ]);\\n DB::table('collection_list')->insert([\\n 'name' => 'Balticman Russia 2021',\\n 'created_at' => date('Y-m-d H:i:s'),\\n 'updated_at' => date('Y-m-d H:i:s'),\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89ce10a423732bada80a9877f588142e\",\n \"score\": \"0.7766432\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n $data_services = [\\n \\t'image_name' => '1.jpg',\\n \\t'urlservices' => 'bao-gia-chup-anh-ky-yeu',\\n \\t'title' => 'CHỤP ẢNH KỶ YẾU',\\n \\t'content' => 'Chụp ảnh kỷ yếu tại Đà Nẵng và các tỉnh miền trung, cho thuê đầy đủ trang phục chụp ảnh kỷ yếu. Các concept mới lạ và vô cùng hấp dẫn đang chờ..'\\n ];\\n\\n $data_test = [\\n 'test3' => 'default',\\n ];\\n\\n // DB::table('services')->insert($data_services);\\n DB::table('test3')->insert($data_test);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"927afdf7da13d136851abcd125662bfa\",\n \"score\": \"0.7764285\",\n \"text\": \"public function run()\\n {\\n // Let's truncate our existing records to start from scratch.\\n // BlogCategories::truncate();\\n\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n // And now, let's create a few articles in our database:\\n for ($i = 0; $i < 10; $i++) {\\n $title = $faker->sentence;\\n $slug = Str::slug($title);\\n BlogCategories::create([\\n 'title' => $title,\\n 'slug' => $slug,\\n 'published' => $faker->boolean($chanceOfGettingTrue = 50),\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19e1efc56559470b618ca6cd001870f9\",\n \"score\": \"0.77625036\",\n \"text\": \"public function run()\\n {\\n // $this->call(UserTableSeeder::class);\\n /*\\n * $users = factory(App\\\\User::class, 3)\\n ->create()\\n ->each(function($u) {\\n $u->posts()->save(factory(App\\\\Post::class)->make());\\n });\\n */\\n\\n //$users = factory(\\\\App\\\\Entities\\\\User::class, 49)->create();\\n //$categories = factory(\\\\App\\\\Entities\\\\Category::class, 10)->create();\\n //$folders = factory(\\\\App\\\\Entities\\\\Folder::class, 150)->create();\\n\\n $urls = factory(\\\\App\\\\Entities\\\\Url::class, 400)->create()->each(function($u){\\n $u->categories()->sync(\\\\App\\\\Entities\\\\Category::all()->random(3));\\n $u->folders()->sync(\\\\App\\\\Entities\\\\Category::all()->random(2));\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb68f54cb7c951e64affa64a0b297782\",\n \"score\": \"0.77620983\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\\n User::truncate();\\n Category::truncate();\\n Product::truncate();\\n Transaction::truncate();\\n DB::table('category_product')->truncate();\\n\\n $quantityUser = 1000;\\n $quantityCategory = 30;\\n $quantityProduct = 1000;\\n $quantityTransaction = 1000;\\n\\n factory(User::class, $quantityUser)->create();\\n factory(Category::class, $quantityCategory)->create();\\n\\n factory(Product::class, $quantityProduct)->create()->each(function($product){\\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\\n $product->categories()->attach($categories);\\n });\\n factory(Transaction::class, $quantityTransaction)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3efab65efe8beca35c2f5491dd14f940\",\n \"score\": \"0.7758514\",\n \"text\": \"public function run()\\n {\\n /*\\n $this->call([\\n UsersTableSeeder::class,\\n ]);\\n */\\n\\n // Test user for authentication\\n factory(User::class)->create([\\n 'name' => 'Elias Johansson',\\n 'biography' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum provident magnam voluptates quidem, ipsa molestiae fuga ullam deserunt at aspernatur! Saepe vero, voluptates animi mollitia sint voluptatum ducimus ipsa vel?',\\n 'username' => 'EliasJ',\\n 'email' => 'elias_johansson@hotmail.se',\\n 'email_verified_at' => now(),\\n 'password' => 'password',\\n 'remember_token' => str_random(10),\\n ]);\\n\\n factory(User::class, 10)->create()->each(function ($user) {\\n factory(Post::class, rand(0, 5))->create(['user_id' => $user->id])->each(function ($post) {\\n\\n $randCount = rand(0, User::count());\\n $randomUsers = User::inRandomOrder()->take($randCount)->get();\\n\\n $randomUsers->each(function ($randUser) use ($post) {\\n factory(Vote::class)->create(['user_id' => $randUser->id, 'voted_id' => $post->id]);\\n });\\n });\\n });\\n\\n factory(Follow::class)->create(['follower_id' => 1, 'followee_id' => 2]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd90f857c514e1c773f1be87e5dfa64c\",\n \"score\": \"0.7758508\",\n \"text\": \"public function run()\\n {\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n \\\\Illuminate\\\\Support\\\\Facades\\\\DB::statement(\\\"SET foreign_key_checks=0\\\");\\n \\\\App\\\\Models\\\\Movie::truncate();\\n \\\\Illuminate\\\\Support\\\\Facades\\\\DB::statement(\\\"SET foreign_key_checks=1\\\");\\n\\n for ($i = 0; $i < 20; $i++) {\\n \\\\App\\\\Models\\\\Movie::create(\\n [\\n 'title' => ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word),\\n 'director' => $faker->name,\\n 'description' => $faker->text,\\n 'poster_path' => 'images/sample_movie_poster/' . rand(1,10) . '.png',\\n 'publish_at' => \\\\Carbon\\\\Carbon::now()->subDays(rand(1,10)),\\n 'rating' => rand(1,5),\\n 'comment_count' => rand(1,100),\\n 'like_count' => rand(1,500),\\n 'unlike_count' => rand(1,30),\\n ]\\n );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91317243366fd0817cbd1d5874e0d4fd\",\n \"score\": \"0.77559274\",\n \"text\": \"public function run()\\n {\\n $this->seed('EnquiriesTableSeeder');\\n $this->seed('FormsTableSeeder');\\n $this->seed('InputsTableSeeder');\\n $this->seed('DataTableSeeder');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3ecd8841e5c87217a3b633febe5ecb6\",\n \"score\": \"0.775367\",\n \"text\": \"public function run()\\n {\\n $this->seed(DataTypesTableSeeder::class);\\n $this->seed(DataRowsTableSeeder::class);\\n $this->seed(MenusTableSeeder::class);\\n $this->seed(MenuItemsTableSeeder::class);\\n $this->seed(RolesTableSeeder::class);\\n $this->seed(PermissionsTableSeeder::class);\\n $this->seed(PermissionRoleTableSeeder::class);\\n $this->seed(SettingsTableSeeder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58699f4c1c3829bc0bf3b1b2107cf4d8\",\n \"score\": \"0.7750695\",\n \"text\": \"public function run()\\n {\\n \\tDB::statement(\\\"SET FOREIGN_KEY_CHECKS=0\\\");\\n \\tfactory(App\\\\User::class,10)->create()->each(function($user){\\n\\n \\t\\t$user->posts()->save(factory(App\\\\Post::class )->make());\\n \\t\\t\\n \\t});\\n \\tfactory(App\\\\Role::class,3)->create(); \\t\\n \\tfactory(App\\\\Category::class,5)->create(); \\t\\n \\tfactory(App\\\\Photo::class,1)->create(); \\t\\n\\n\\n // $this->call(UsersTableSeeder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9df141f7b179d1aa331fe8dbfc58ebc\",\n \"score\": \"0.7750042\",\n \"text\": \"public function run()\\n {\\n $this->call(RoleSeeder::class);\\n $this->call(PermissionAndGroupSeeder::class);\\n $this->call(PermissionPierAndCategoriesSeeder::class);\\n $this->call(PierCategoriesSeeder::class);\\n $this->call(PiersSeeder::class);\\n $this->call(UsersSeeder::class);\\n $this->call(CountriesSeeder::class);\\n $this->call(CompanyTypesSeeder::class);\\n Country::whereIn('name', [\\n 'INDONESIA',\\n 'MALAYSIA',\\n 'PHILIPPINES',\\n 'SINGAPORE',\\n 'THAILAND'\\n ])->update(['highlighted'=> true]);\\n Boat::factory()->count(60)->create();\\n Ship::factory()->count(5000)->create();\\n AccessRequest::factory()->count(60)->create();\\n Company::factory()->count(10)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac07049886266992b4877e0bbac4f46e\",\n \"score\": \"0.7747288\",\n \"text\": \"public function run()\\n /*collect alle db seeds voor seeding */\\n {\\n $this->call(CategoryTableSeeder::class);\\n $this->call(ProductsTableSeeder::class);\\n $this->call(CouponsTableSeeder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"985b4aaf160ac664b8922a8544515d44\",\n \"score\": \"0.7742104\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n /* $faker = Faker::create();\\n foreach (range(1, 20) as $index){\\n DB::table('blogs')->insert([\\n 'name' => $faker->name,\\n 'email' => $faker->email,\\n 'password' => bcrypt('secret'),\\n ]);\\n } */\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aca9b2cf26903130f7380f92f55a473c\",\n \"score\": \"0.77418184\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\\n\\n User::truncate();\\n Book::truncate();\\n College::truncate();\\n\\n $userQuantity = 50;\\n\\n factory(User::class, 50)->create();\\n factory(Book::class, 50)->create();\\n factory(College::class, 2)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30d64a1e579c6e0f0a830b95c66b1bfa\",\n \"score\": \"0.7741139\",\n \"text\": \"public function run()\\n {\\n $this->empresarSeeder();\\n $this->empresarPersonaSeeder();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"470a485c944168ddbe9d5621e9882146\",\n \"score\": \"0.7738656\",\n \"text\": \"public function run()\\n {\\n $this->call(RoleSeeder::class);\\n $this->call(UserSeeder::class);\\n factory(Category::class, 6)->create();\\n factory(Tag::class, 10)->create();\\n factory(Post::class, 30)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3727173589775f381466040e171579e2\",\n \"score\": \"0.77327454\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n $this->call([\\n UsersTableSeeder::class,\\n PostsTableSeeder::class,\\n CommentsTableSeeder::class,\\n ]);\\n /* DB::table('posts')->insert([\\n 'title' => 'Car',\\n 'content' => 'Super cool car',\\n ]);\\n DB::table('posts')->insert([\\n 'title' => 'Another Car',\\n 'content' => 'Another Super cool car',\\n ]);\\n DB::table('comments')->insert([\\n 'user_id' => '12',\\n 'post_id' => '1',\\n 'content' => 'Dear Car Talk: I have a 1951 Chevy, straight-6, 3-on-the-tree, with 31,000 actual miles. Nice car.',\\n ]);\\n DB::table('comments')->insert([\\n 'user_id' => '9',\\n 'post_id' => '1',\\n 'content' => 'Nice car!',\\n ]);\\n */\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0edbf15de8e4e944dd2074ed1b57afd8\",\n \"score\": \"0.7727652\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n /* factory(App\\\\User::class,100)->create();\\n factory(App\\\\Modele\\\\Category::class,20)->create(); \\n factory(App\\\\Modele\\\\Post::class,1500)->create();\\n\\n factory(App\\\\Modele\\\\Tag::class,50)->create();\\n factory(App\\\\Modele\\\\Image::class,3500)->create(); \\n factory(App\\\\Modele\\\\Video::class,1050)->create();\\n factory(App\\\\Modele\\\\Comment::class,4500)->create();*/ \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdc741a314743eae755e3c22f3f76551\",\n \"score\": \"0.772744\",\n \"text\": \"public function run()\\n {\\n $this->seedUser();\\n// $this->seedCategoryAndPosts();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38858c934978757be077df51a3a020d1\",\n \"score\": \"0.7727246\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n // inicializa tabla USERS\\n DB::table(\\\"users\\\")->insert(\\n [\\n \\\"id\\\"=> 1,\\n \\\"name\\\" =>\\\"admin\\\",\\n \\\"email\\\"=>\\\"admin@admin.com\\\",\\n \\\"email_verified_at\\\"=> NULL,\\n \\\"password\\\"=>'$2y$10$hhTW0KElMnPuQO9GFZT1yOIrXd6LI/KabIAMWv0kYNlql0pZtEMjS',\\n \\\"facebook\\\" => \\\"admin\\\",\\n \\\"twitter\\\"=>\\\"admin\\\",\\n \\\"instagram\\\"=>\\\"admin\\\",\\n \\\"avatar\\\"=>\\\"userImage.png\\\",\\n \\\"rol_id\\\"=>2, \\n \\\"created_at\\\" =>NULL,\\n \\\"updated_at\\\" =>NULL\\n ]\\n );\\n\\n // inicializa tabla PAIS\\n DB::table(\\\"pais\\\")->insert(\\n [\\n \\\"id_pais\\\"=> 1,\\n \\\"nombre_pais\\\" => \\\"Argentina\\\",\\n \\\"created_at\\\" =>NULL,\\n \\\"updated_at\\\" =>NULL\\n ]\\n );\\n\\n // inicializa tabla PROVINCIAS\\n factory(App\\\\Provincia::class, 23)->create();\\n\\n // inicializa tabla DESTINOS\\n factory(App\\\\Destino::class, 20)->create();\\n\\n // inicializa tabla COMENTARIOS\\n factory(App\\\\Comentario::class, 10)->create();\\n\\n // inicializa tabla FAVORITOS\\n factory(App\\\\Favorito::class, 5)->create();\\n \\n // inicializa tabla MENSAJES\\n factory(App\\\\Mensaje::class, 5)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"258a68b251e7e52b90e764a986aea0f9\",\n \"score\": \"0.772715\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n factory(App\\\\Property::class, 5)->create();\\n factory(App\\\\Contact::class, 5)->create();\\n factory(App\\\\Feature::class, 5)->create();\\n factory(App\\\\Location::class, 5)->create();\\n factory(App\\\\Image::class, 5)->create();\\n factory(App\\\\Video::class, 5)->create();\\n factory(App\\\\Tag::class, 5)->create();\\n factory(App\\\\Employee::class, 5)->create();\\n factory(App\\\\PropertyEmployee::class, 5)->create();\\n factory(App\\\\User::class, 5)->create();\\n factory(App\\\\UserEmployee::class, 5)->create();\\n factory(App\\\\UserDetail::class, 5)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ddfa6b8e708696db5d12d34c9d4f728\",\n \"score\": \"0.77262276\",\n \"text\": \"public function run()\\n {\\n // Seed with fake role.\\n // factory(App\\\\Role::class, 3)->create();\\n \\n // Seed with real life roles.\\n $roles = [\\n ['id'=> 250, 'role' => 'Banned', 'vote_weight' => 0, 'spam_threshold' => 0],\\n ['id'=> 500, 'role' => 'Registered user', 'vote_weight' => 1, 'spam_threshold' => 10],\\n ['id'=> 750, 'role' => 'Confirmed user', 'vote_weight' => 2, 'spam_threshold' => 50],\\n ['id'=> 875, 'role' => 'Editor', 'vote_weight' => 3, 'spam_threshold' => 200],\\n ['id'=> 1000, 'role' => 'Administrator', 'vote_weight' => 4, 'spam_threshold' => 1000],\\n ];\\n \\n foreach ($roles as $role) {\\n Role::create($role);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da35f91bdc164c9487439ff37cc282a4\",\n \"score\": \"0.7723784\",\n \"text\": \"public function run()\\n {\\n // $this->call(UserSeeder::class);\\n Admin::create([\\n 'name' => 'admin',\\n 'email' => 'admin@gmail.com',\\n 'password' => bcrypt('password'),\\n ]);\\n\\n Employee::create([\\n 'name' => 'pegawai',\\n 'address' => 'surabaya',\\n 'phone' => 86665656666,\\n 'email' => 'pegawai@gmail.com',\\n 'password' => bcrypt('password'),\\n ]);\\n\\n User::create([\\n 'name' => 'user',\\n 'email' => 'user@gmail.com',\\n 'password' => bcrypt('password'),\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65ebc2415901c1804329cb5eda67fd26\",\n \"score\": \"0.7723222\",\n \"text\": \"public function run()\\n {\\n\\n\\n\\n $faker = Faker\\\\Factory::create();\\n\\n DB::table('users_roles')->insert([\\n 'name' => 'Admin',\\n\\n ]);\\n DB::table('users_roles')->insert([\\n 'name' => 'Editor',\\n\\n ]);\\n DB::table('users_roles')->insert([\\n 'name' => 'Guest',\\n\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e0f063fa5c69434fdf04122ef66efe5\",\n \"score\": \"0.77228445\",\n \"text\": \"public function run()\\n {\\n // Wipe the table clean before populating\\n DB::table('users')->delete();\\n\\n $users = array(\\n [\\n \\\"name\\\" => \\\"Auto Customs Inc.\\\",\\n \\\"phone\\\" => '877-204-7002',\\n \\\"email\\\" => \\\"name@autocustoms.com\\\",\\n ],\\n [\\n \\\"name\\\" => \\\"Philip Meckling\\\",\\n \\\"phone\\\" => '321-501-1234',\\n \\\"email\\\" => \\\"slydvox@aol.com\\\",\\n ],\\n [\\n \\\"name\\\" => \\\"Joe Blough\\\",\\n \\\"phone\\\" => '888-123-4567',\\n \\\"email\\\" => \\\"jb@mykumpnee.com\\\",\\n ],\\n\\n );\\n\\n // Run the seeder\\n DB::table('users')->insert($users);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e37cab7241cc60bd3248948e0026f7c7\",\n \"score\": \"0.7722144\",\n \"text\": \"public function run()\\n {\\n $this->call(RoleSeeder::class);\\n $this->call(UserSeeder::class);\\n $this->call(GenreSeeder::class);\\n\\n $users = User::factory(10)->hasAttached(Role::find(2))->create();\\n\\n $artists = Artist::factory(10)->create();\\n\\n // artists and genres must be generated before songs\\n $songs = Song::factory(100)->create();\\n\\n // users must be generated before playlists. \\n // playlist_song entries are created with the hasAttached method.\\n $playlists = Playlist::factory(10)->hasAttached($songs)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad511f434f764c2a5e866a1356beb2a7\",\n \"score\": \"0.77177405\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n DB::table('groups')->insert([['group_name' => 'student'],['group_name' => 'employee']]);\\n DB::table('system_roles')->insert([['role_name' => 'none'],['role_name' => 'beadle'],['role_name' => 'osa'],['role_name' => 'teacher']]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4315481d0f561c009a68fbd4d76a6b88\",\n \"score\": \"0.77141565\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n $faker = Faker\\\\Factory::create();\\n\\n\\n DB::table('users')->delete();\\n\\n for($i = 0; $i < 10; ++$i)\\n {\\n DB::table('users')->insert([\\n 'name' => 'Nom' . $i,\\n 'email' => 'email' . $i . '@blop.fr',\\n 'avatar' => 'profile.png',\\n 'admin' => rand(0, 1),\\n 'password' => bcrypt('password' . $i)\\n ]);\\n }\\n\\n for ($i=0;$i<10;$i++)\\n {\\n DB::table('membres_tribunal')->insert( [\\n\\n 'nom'=>str_random(10),\\n 'telephone'=>mt_rand(666666666,699999999),\\n 'grade'=> 'Avocat'\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32fcf6bca24d0a313359673895169dfc\",\n \"score\": \"0.7713102\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n //DB::statement('SET FOREIGN_KEYS_CHECKS = 0');\\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //MySql\\n Libro::truncate();\\n Libreria::truncate();\\n\\n $countLibreria = 50;\\n $countLibros = 5000;\\n\\n factory(Libreria::class, $countLibreria)->create();\\n factory(Libro::class, $countLibros)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"384e8b5815d2e9af9d70eae3d52245a6\",\n \"score\": \"0.77096856\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n // factory(Address::class,1000)->create();\\n // factory(User::class,500)->create();\\n //factory(Product::class,1500)->create();\\n //factory(Image::class,1000)->create();\\n factory(Review::class,3500)->create();\\n //factory(Category::class,50)->create();\\n //factory(Tag::class,150)->create();\\n //factory(Role::class,5)->create();\\n //factory(Ticket::class,7)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdf9c786dbc3525631942e19087b8a23\",\n \"score\": \"0.7705496\",\n \"text\": \"public function run()\\n {\\n Book::create([\\n 'title' => 'The Two Towers',\\n 'author' => 'J.R.R. Tolkien'\\n ]);\\n Book::create([\\n 'title' => 'Man in Search of Meaning',\\n 'author' => 'Viktor Frankl'\\n ]);\\n Book::create([\\n 'title' => 'The Alchemist',\\n 'author' => 'Paolo Coehlo'\\n ]);\\n Book::create([\\n 'title' => 'East of Eden',\\n 'author' => 'John Steinbeck'\\n ]);\\n Book::create([\\n 'title' => 'Aeneid',\\n 'author' => 'Virgil'\\n ]);\\n Book::create([\\n 'title' => 'Paradiso',\\n 'author' => 'Dante Alighieri'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17a5e5a2dc7a47f3dc1d9f42adc78825\",\n \"score\": \"0.77012074\",\n \"text\": \"public function run()\\n {\\n $this->call(CommunitySeeder::class);\\n // $this->call(PolingSeeder::class);\\n DB::table('poling')->insert([\\n 'title' => 'Pemilihan Ketua',\\n 'description' => 'Pemilihan',\\n 'start_at' => '2021-08-24',\\n 'stop_at' => '2021-08-25'\\n ]);\\n $this->call(UserSeeder::class);\\n $this->call(CandidateSeeder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02839fd48d7058b2c787b8ed974c5c65\",\n \"score\": \"0.770105\",\n \"text\": \"public function run()\\n {\\n // User::truncate();\\n // Category::truncate();\\n\\n DB::table('users')->insert([\\n 'name' => 'admin',\\n 'email' => 'admin@gmail.com',\\n 'password' => Hash::make('12345678'),\\n 'username' => 'admin',\\n 'isAdmin' => '1',\\n 'created_at' => Carbon::now(),\\n 'updated_at' => Carbon::now(),\\n ]);\\n\\n DB::table('categories')->insert([\\n 'name' => 'ที่นอน',\\n 'created_at' => Carbon::now(),\\n 'updated_at' => Carbon::now(),\\n ]);\\n // $this->call(UsersTableSeeder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03809687e5d587409a10b664ad575d6d\",\n \"score\": \"0.7699341\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n // create default townships\\n $faker = Faker\\\\Factory::create();\\n for ($i = 0; $i < 30; $i++) {\\n \\\\App\\\\Models\\\\Township::create([\\n 'code' => $faker->numberBetween(1000000, 22002038),\\n 'area' => $faker->numberBetween(20, 500),\\n 'location' => $faker->address,\\n 'latitude' => $faker->numberBetween(232322, 44534445),\\n 'longitude' => $faker->numberBetween(232322, 44534445)\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bcd80a79b26bc6230d0dbafbf53a13d\",\n \"score\": \"0.7699336\",\n \"text\": \"public function run()\\n {\\n //empty the database first\\n DB::table('books')->delete();\\n\\n $books = [\\n\\n [\\n 'user_id' => 1,\\n 'title' => 'Laravel 5.7 For Dummies',\\n 'description' => 'This is the right book for you if you want to get started with using the Laravel framework',\\n 'created_at' => Carbon::now(),\\n 'updated_at' => Carbon::now(),\\n ],\\n\\n [\\n 'user_id' => 1,\\n 'title' => 'Laravel vs Node.js',\\n 'description' => 'This is an ebook comparing the difference and similarities between Laravel and Node.js',\\n 'created_at' => Carbon::now(),\\n 'updated_at' => Carbon::now(),\\n ],\\n\\n ];\\n\\n DB::table('books')->insert($books);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33c290db4d794815321050e69479ef9e\",\n \"score\": \"0.76983786\",\n \"text\": \"public function run()\\n {\\n /**\\n * truncates tables before seeding\\n */\\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\\n App\\\\User::truncate();\\n App\\\\Product::truncate();\\n App\\\\Transaction::truncate();\\n App\\\\Category::truncate();\\n DB::table('category_product')->truncate();\\n\\n\\n\\n /**\\n * prevent Events \\n */\\n User::flushEventListeners();\\n Product::flushEventListeners();\\n Transaction::flushEventListeners();\\n Category::flushEventListeners();\\n\\n /**\\n * seeding table users\\n */\\n factory(App\\\\User::class,1000)->create();\\n /**\\n * seeding table categories\\n */\\n factory(App\\\\Category::class,30)->create();\\n /**\\n * seeding table products and the pivot table\\n */\\n factory(App\\\\Product::class,1000)->create()->each(\\n function($product){\\n $categories = App\\\\Category::all()->random(mt_rand(1,5))->pluck('id');\\n $product->categories()->attach($categories);\\n });\\n /**\\n * seeding table transactions\\n */\\n factory(App\\\\Transaction::class,1000)->create();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ab1da7523b244be048582931b4784b6\",\n \"score\": \"0.76981217\",\n \"text\": \"public function run()\\n {\\n $this->call(PermissionsTableSeeder::class);\\n factory(App\\\\Product::class, 50)->create();\\n factory(App\\\\User::class, 6)->create();\\n\\n factory(App\\\\Category::class, 20)->create();\\n factory(App\\\\Tag::class, 21)->create();\\n\\n factory(App\\\\Post::class, 300)->create()->each(function(App\\\\Post $post){\\n $post->tags()->attach([\\n rand(1,5),\\n rand(6,14),\\n rand(15,20),\\n\\n ]);\\n });\\n //fregona para cargar tablas pivote recordar dar de alta la relacioón sino no funciona\\n\\n\\n Role::create([\\n 'name' => 'Admin',\\n 'slug' => 'admin',\\n 'special' => 'all-access'\\n ]);\\n\\n App\\\\User::create([\\n 'name'=>'rodrigo',\\n 'email'=>'rodrigo@gmail.com',\\n 'password'=>bcrypt('rorro'),\\n\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b51251d22df55c7b04c27df5213a7b2\",\n \"score\": \"0.76964283\",\n \"text\": \"public function run()\\n {\\n $categories = factory(Category::class)->times(5)->create();\\n // $product = factory(Product::class)->times(5)->create();\\n \\n foreach ($categories as $category) {\\n factory(Product::class)->times(3)->create([\\n 'category_id' => $category->id\\n ]);\\n }\\n\\n $this->call([\\n UsersTableSeeder::class,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb8674413c8a4104e4b1c436f70ed975\",\n \"score\": \"0.7695707\",\n \"text\": \"public function run()\\n {\\n //factory('App\\\\User',60)->create();\\n // $this->call(UsersTableSeeder::class);\\n /*$faker = Faker::create();\\n foreach (range(1,5) as $index) {\\n \\t$my_category = DB::table('ordercategorgies')->insert([\\n\\t \\t'order_type' => $faker->randomElement(['local food' ,'take away']),\\n\\t \\t'food_photo' => $faker->imageUrl($width = 100, $height = 100),\\n\\t ]);\\n }*/\\n // dd($my_food);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a18a3a4890fe667e04bd7d3caf5a59e7\",\n \"score\": \"0.7693732\",\n \"text\": \"public function run()\\n {\\n // \\\\App\\\\Models\\\\User::factory(10)->create();\\n// $categories = Category::factory(5)->create();\\n// $sources = Source::factory(5)->create();\\n//\\n// foreach ($categories as $category)\\n// {\\n// foreach ($sources as $source)\\n// {\\n// News::factory(10,\\n// [\\n// 'category_id' => $category->id,\\n// 'source_id' => $source->id,\\n// ])\\n// ->create();\\n// }\\n// }\\n\\n $sources = Source::factory(10)->create();\\n\\n Category::factory(10)\\n ->create()\\n ->each(function ($category) use ($sources) {\\n News::factory(10,\\n [\\n 'category_id' => $category->id,\\n 'source_id' => $sources[rand(0, count($sources) - 1)]->id,\\n ])\\n ->create();\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"329b24a3b852e37339619d080f8e67c4\",\n \"score\": \"0.76924825\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n\\n DB::table('users')->insert([\\n 'name'=>'Information Technology',\\n 'abbreviation'=>'IT',\\n 'email'=>'admin@it.com',\\n 'password'=>Hash::make('itpass'),\\n 'role'=>'Admin'\\n ]);\\n\\n // DB::table('inventories')->insert([\\n // 'motherboard'=>'helasd',\\n // 'cpu'=>'asd',\\n // 'hdd'=>'dg',\\n // 'memory'=>'agdfsd',\\n // 'monitor'=>'sdfg',\\n // 'case'=>'dsfgd',\\n // 'keyboard'=>'',\\n // 'mouse'=>'',\\n // 'video_card'=>'',\\n // 'power_supply'=>'',\\n // 'printer'=>'',\\n // 'telephone'=>''\\n // ]);\\n \\n DB::table('users')->insert([\\n 'name'=>'Human Resource',\\n 'abbreviation'=>'HR',\\n 'email'=>'admin@hr.com',\\n 'password'=>Hash::make('hrpass'),\\n 'role'=>'User'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f312cccea49d3336d07a2c524243b0e9\",\n \"score\": \"0.7692105\",\n \"text\": \"public function run()\\n {\\n /*\\n * In a real production system, I imagine you'd either seed\\n * reasonable credentials for a trusted user, or you'd have\\n * no seeder and have someone with database access insert\\n * the first user manually.\\n * It's not necessary for the admin user to be an author,\\n * but why waste seeded data?\\n * Explicitly stated ID of 1 should fail if there's any data in\\n * the table. Only run these seeders on a fresh database.\\n */\\n DB::table('users')->insert(\\n [\\n 'id' => 1,\\n 'name' => 'Admin Admin',\\n 'email' => 'admin@example.com',\\n 'password' => bcrypt('password'),\\n 'isAdmin' => true,\\n 'isAuthor' => true,\\n ]\\n );\\n\\n DB::table('users')->insert(\\n [\\n 'id' => 2,\\n 'name' => 'Arthur Author',\\n 'email' => 'author@example.com',\\n 'password' => bcrypt('password'),\\n 'isAuthor' => true,\\n ]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7257c69616adc43e5cde09cbe9609093\",\n \"score\": \"0.7689786\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n // factory(App\\\\Articulo::class,10)->create();\\n // factory(App\\\\Periodista::class,10)->create();\\n // factory(App\\\\Sucursal::class,10)->create();\\n // factory(App\\\\Tipo::class,10)->create();\\n // factory(App\\\\Empleado::class,10)->create();\\n // factory(App\\\\Revista::class,10)->create();\\n // factory(App\\\\Periodista_Articulo::class,10)->create();\\n factory(App\\\\Revista_Articulo::class,10)->create();\\n //factory(App\\\\Sucursal_Revista::class,10)->create(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b28aea8b99ae559650697917bb74848\",\n \"score\": \"0.7688806\",\n \"text\": \"public function run()\\n {\\n $faker = Faker::create();\\n Schema::disableForeignKeyConstraints();\\n DB::table('positions')->truncate();\\n\\n $positions = [];\\n $stores = DB::table('stores')->take(10)->get();\\n\\n foreach ($stores as $store) {\\n $positions[] =\\n [\\n 'name' => 'Lightbox_' . $faker->randomNumber(2),\\n 'description' => $faker->text,\\n 'image_url'=> '',\\n 'store_id' => $store->id,\\n 'channel' => 'Lightbox',\\n 'buffer_days' => 2,\\n 'unit' => 'day',\\n 'price' => 2000000,\\n ];\\n $positions[] =\\n [\\n 'name' => 'Billboard_' . $faker->randomNumber(2),\\n 'description' => $faker->text,\\n 'image_url'=> '',\\n 'store_id' => $store->id,\\n 'channel' => 'Billboard',\\n 'buffer_days' => 2,\\n 'unit' => 'day',\\n 'price' => 5000000,\\n ];\\n }\\n\\n DB::table('positions')->insert($positions);\\n Schema::enableForeignKeyConstraints();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdceb467a92f830a50199ac2a220b8b3\",\n \"score\": \"0.7685507\",\n \"text\": \"public function run()\\n {\\n\\n //create 3 users\\n //Illuminate\\\\Support\\\\Facades\\\\DB::table('users')->delete();\\n factory(App\\\\Models\\\\User::class, 3)->create();\\n factory(\\\\App\\\\Models\\\\Country::class, 50)->create();\\n factory(\\\\App\\\\Models\\\\Genre::class, 10)->create();\\n factory(\\\\App\\\\Models\\\\Comment::class, 3)->create();\\n\\n //assign each film to a genre\\n \\\\App\\\\Models\\\\Film::all()->each(function($film) {\\n factory(\\\\App\\\\Models\\\\FilmGenres::class, 1)->create(['film_id'=>$film->id]);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08ef2d96ca9f09f01db166c921bcded0\",\n \"score\": \"0.768112\",\n \"text\": \"public function run()\\n {\\n $this->call(UsersTableSeeder::class);\\n // $this->call(StaticContentSeeder::class);\\n // factory(App\\\\Menu::class, 20)->create();\\n // factory(App\\\\Page::class, 20)->create();\\n // factory(App\\\\PageItem::class, 20)->create();\\n // factory(App\\\\Company::class, 20)->create();\\n // factory(App\\\\Announcment::class, 20)->create();\\n // factory(App\\\\Survey::class, 20)->create();\\n // factory(App\\\\SurveyQuestion::class, 20)->create();\\n // factory(App\\\\SurveyAnswerOption::class, 20)->create();\\n // factory(App\\\\SurveyHit::class, 20)->create();\\n // factory(App\\\\Transaction::class, 20)->create();\\n // factory(App\\\\StaticContent::class, 20)->create();\\n // factory(App\\\\Search::class, 20)->create();\\n // factory(App\\\\Sector::class, 20)->create();\\n // factory(App\\\\SubscriptionPlan::class, 20)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b05010d7103a3a12b2577b68b3dba100\",\n \"score\": \"0.7679989\",\n \"text\": \"public function run()\\n {\\n// DB::table('users')->truncate();\\n// DB::table('roles')->truncate();\\n\\n $this->call(RoleCreateSeeder::class);\\n factory(App\\\\Models\\\\User::class, 10)->create();\\n factory(App\\\\Models\\\\Category::class,20)->create();\\n factory(App\\\\Models\\\\Post::class,1000)->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"884fc4f5db946c3ac90deba14a0e705d\",\n \"score\": \"0.7676729\",\n \"text\": \"public function run()\\n {\\n User::create([\\n 'username' => 'admin',\\n 'email' => 'admin@admin.com',\\n 'password' => bcrypt('111'),\\n 'role_id' => 1,\\n 'email_verified_at' => date('Y-m-d h:i:s'),\\n ]);\\n\\n // $faker = Faker::create();\\n \\t// foreach (range(1,20) as $index) {\\n\\t // DB::table('users')->insert([\\n // 'username' => strtolower($faker->unique()->firstName()),\\n\\t // 'email' => $faker->email,\\n // 'password' => bcrypt('111'),\\n // 'role_id' => 2,\\n // 'email_verified_at' => $faker->date('Y-m-d', 'now')\\n\\t // ]);\\n\\t // }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4470aaaaba217c380aa7eb641709475\",\n \"score\": \"0.76756257\",\n \"text\": \"public function run()\\n {\\n //DB::table('reviews')->delete();\\n DatabaseSeeder::ClearTable('reviews');\\n\\n Review::create(\\n array('user_id' => '3', 'text' => 'Отличный питомник, грамотные и доброжелательные заводчики!\\n Большое спасибо вам за нашу собаку!', 'published' => '0')\\n );\\n\\n Review::create(\\n array('user_id' => '3', 'text' => 'Отличный питомник ,все собачки красивые и породные ,чемпионы,\\n с хорошим здоровьем . Мы очень довольны выбором .Всем рекомендуем.', 'published' => '1')\\n );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"520f4a3190cf8cb42f24a3f54f6e405e\",\n \"score\": \"0.7672599\",\n \"text\": \"public function run()\\n {\\n // $this->call(UsersTableSeeder::class);\\n $faker = Faker\\\\Factory::create();\\n\\n foreach (range(1,10) as $index ){\\n \\tDB::table('students')->insert([\\n \\t\\t'first_name'=> $faker->firstName,\\n \\t\\t'last_name'=>$faker->lastName,\\n \\t\\t'date_of_birth'=>$faker->DateTime,\\n \\t\\t'student_id'=>$faker->ean8,\\n \\t\\t'gender'=>$faker->boolean,\\n \\t\\t'phone_number'=>$faker->randomDigit,\\n \\t\\t'email'=> $faker->email,\\n \\t\\t'semester'=>$faker->randomDigit,\\n \\t\\t'class'=>$faker->sentence\\n\\n \\t\\t]);\\n }\\n // $this->call(StudentsTableSeeder::run());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"390fa29c1c99b4bb24ad7a2b512bf966\",\n \"score\": \"0.7671107\",\n \"text\": \"public function run()\\n {\\n // $this->call(RoleSeeder::class);\\n // $this->call(PermissionSeeder::class);\\n // $this->call(UserSeeder::class);\\n $user = User::factory()->create(['name' => 'Jhon Snow']);\\n $user2 = User::factory()->create(['name' => 'Cthulhu Doe']);\\n $user3 = User::factory()->create(['name' => 'Alsina Dimitresku']);\\n $user4 = User::factory()->create(['name' => 'Master']);\\n $user5 = User::factory()->create(['name' => 'General', 'email' => 'general@mail.ru', 'password' => 'general']);\\n $category = Category::factory()->create(['name' => 'War']);\\n $category2 = Category::factory()->create(['name' => 'Magic']);\\n $category3 = Category::factory()->create(['name' => 'Villages']);\\n\\n Post::factory(5)->create(['user_id' => $user->id, 'category_id' => $category->id]);\\n Post::factory(5)->create(['user_id' => $user2->id, 'category_id' => $category2->id]);\\n Post::factory(3)->create(['user_id' => $user2->id, 'category_id' => $category3->id]);\\n Post::factory(6)->create(['user_id' => $user3->id, 'category_id' => $category3->id]);\\n Post::factory(3)->create(['user_id' => $user4->id, 'category_id' => $category->id]);\\n Post::factory(2)->create(['user_id' => $user4->id, 'category_id' => $category2->id]);\\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9fa3efca175f7f31cd9e7dbd866e396\",\n \"score\": \"0.7670872\",\n \"text\": \"public function run()\\n {\\n //$this->call(UsersTableSeeder::class);\\n\\n DB::table('users')->insert([\\n ['role_id' => '1', 'name' => 'admin', 'email' => 'admin@lms.com', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\\n ['role_id' => '2', 'name' => 'teacher', 'email' => 'teacher@lms.com', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\\n ]);\\n\\n DB::table('roles')->insert([\\n ['name' => 'Teacher'], \\n ['name' => 'Admin'],\\n ['name' => 'Staff'],\\n ['name' => 'accountant'],\\n ]);\\n\\n DB::table('days')->insert([\\n ['day' => 'Satarday'],\\n ['day' => 'Sunday'],\\n ['day' => 'Monday'],\\n ['day' => 'Tuesday'],\\n ['day' => 'Wednesday'],\\n ['day' => 'Thusday'],\\n ['day' => 'Friday'],\\n ]);\\n\\n // DB::table('periods')->insert([\\n // ['name' => 'Period 1'],\\n // ['name' => 'Period 2'],\\n // ['name' => 'Period 3'],\\n // ['name' => 'Period 4'],\\n // ['name' => 'Period 5'],\\n // ['name' => 'Period 6'],\\n // ['name' => 'Period 7'],\\n // ]);\\n\\n DB::table('school_classes')->insert([\\n ['name' => 'One'],\\n ['name' => 'Two'],\\n ['name' => 'Three'],\\n ['name' => 'Four'],\\n ['name' => 'Five'],\\n ['name' => 'Six'],\\n ['name' => 'Seven'],\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89ec7e3fec2adf84109c14670c573096\",\n \"score\": \"0.7670576\",\n \"text\": \"public function run()\\n {\\n \\\\App\\\\Models\\\\Titre::factory(40)->create();\\n \\\\App\\\\Models\\\\Resume::factory(10)->create();\\n\\n\\n $this->call([\\n CoordonneeSeeder::class,\\n StatistiquesSeeder::class,\\n CompetenceSeeder::class,\\n PhotoSeeder::class\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b2a01f87307d1f6a7c835e40ee5ee65\",\n \"score\": \"0.76704764\",\n \"text\": \"public function run()\\n {\\n $books = json_decode(file_get_contents(database_path().'/seedData/books.json'), True);\\n\\n foreach ($books as $title => $book) {\\n Book::create([\\n 'title' => $title,\\n 'author' => $book['author'],\\n 'year_published' => $book['year_published'] ?? null,\\n 'image_url' => $book['image_url'] ?? null,\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ccc15187b4ea3c508675a1b9719d8ce\",\n \"score\": \"0.76691145\",\n \"text\": \"public function run()\\n {\\n // Let's truncate our existing records to start from scratch.\\n \\\\App\\\\Models\\\\Office::truncate();\\n\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n //Populate offices table\\n $manypopulate = 50;\\n\\n for($i= 0; $i < $manypopulate; $i++){\\n \\\\App\\\\Models\\\\Office::create([\\n 'name' => $faker->sentence,\\n 'address' => $faker->sentence,\\n ]);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91c9b2e508b7a00cf3618bc6f31b7019\",\n \"score\": \"0.7667186\",\n \"text\": \"public function run()\\n {\\n\\n /** @var \\\\Faker\\\\Generator $faker */\\n $faker = App::make(Faker\\\\Generator::class);\\n\\n \\\\DB::statement(\\\"SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\\\");\\n\\n $this->clearTable(\\\"buyers\\\");\\n $this->clearTable(\\\"sellers\\\");\\n $this->clearTable(\\\"estates\\\");\\n $this->clearTable(\\\"agents\\\");\\n $this->clearTable(\\\"users\\\");\\n $this->clearTable(\\\"agent_estate\\\");\\n $this->clearTable(\\\"orders\\\");\\n $this->clearTable(\\\"proposals\\\");\\n\\n \\\\DB::statement(\\\"SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\\\");\\n\\n $this->command->comment(\\\"Seeding users\\\");\\n factory(\\\\App\\\\User::class, 200)->create();\\n\\n $buyers = \\\\App\\\\User::where('user_type', 0)->get();\\n $sellers = \\\\App\\\\User::where('user_type', 1)->get();\\n $agents = \\\\App\\\\User::where('user_type', 2)->get();\\n\\n $this->command->comment(\\\"Seeding buyer\\\");\\n foreach ($buyers as $buyer) {\\n /** @var \\\\App\\\\Buyer $instance */\\n $instance = new \\\\App\\\\Buyer;\\n $instance->user_id = $buyer->id;\\n $instance->save();\\n }\\n\\n $this->command->comment(\\\"Seeding agent\\\");\\n foreach ($agents as $agent) {\\n /** @var \\\\App\\\\Agent $instance */\\n $instance = new \\\\App\\\\Agent;\\n $instance->user_id = $agent->id;\\n $instance->title = $faker->company;\\n $instance->fee = $faker->numberBetween(10000, 200000) / 100;\\n $instance->description = $faker->paragraph;\\n $instance->save();\\n }\\n\\n $this->command->comment(\\\"Seeding seller\\\");\\n\\n\\n foreach ($sellers as $seller) {\\n $is_verified = 1 - intval($faker->numberBetween(0, 7) / 5);\\n /** @var \\\\App\\\\Seller $instance */\\n $instance = new \\\\App\\\\Seller;\\n $instance->user_id = $seller->id;\\n $instance->verified = $is_verified;\\n $instance->verified_by_agent_id = $is_verified ? App\\\\Helpers\\\\Util::randomArrayMember($agents)->id : null;\\n $instance->id_card_num = strval($faker->randomNumber(8)) . strval($faker->randomNumber(8));\\n $instance->save();\\n }\\n\\n\\n $this->command->comment(\\\"Seeding estates\\\");\\n factory(\\\\App\\\\Estate::class, 500)->create();\\n\\n $this->command->comment(\\\"Run php artisan seed:relations\\\");\\n return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"355839e7a0c00a26ac93a195a1884fe3\",\n \"score\": \"0.76666796\",\n \"text\": \"public function run()\\n {\\n // \\\\App\\\\Models\\\\User::factory(10)->create();\\n\\n // Blog::factory(15)->create();\\n\\n User::factory(15)\\n ->create()\\n ->each(function ($user) {\\n Blog::factory(random_int(2, 5))\\n ->seeding()\\n ->create(['user_id' => $user])\\n ->each(function ($blog) {\\n Comment::factory(random_int(1, 3))->create(['blog_id' => $blog]);\\n });\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"185338e2242eb2e25db37e4fd2d6c989\",\n \"score\": \"0.7666168\",\n \"text\": \"public function run()\\n {\\n // Let's truncate our existing records to start from scratch.\\n Membresia::truncate();\\n\\n // Initialize the Faker package. We can use several different locales for it, so\\n // let's use the german locale to play with it.\\n $faker = \\\\Faker\\\\Factory::create('es_ES');\\n\\n // And now, let's create a few articles in our database:\\n for ($i = 1; $i < 30; $i++) {\\n Membresia::create([\\n 'name' => $faker->name,\\n 'dni' => $faker->randomNumber(5),\\n 'role' => $faker->name (),\\n 'status' => $faker->name (),\\n ]);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b51f9ef314a6dd780dd083daea1bf1f0\",\n \"score\": \"0.7664776\",\n \"text\": \"public function run()\\n {\\n \\t$faker= Faker::create();\\n\\n \\t$canino_role = DB::table('especie')\\n ->select('id')\\n ->where('nombre', 'Canino')\\n ->first()\\n ->id;\\n\\n $felino_role = DB::table('especie')\\n ->select('id')\\n ->where('nombre', 'Felino')\\n ->first()\\n ->id;\\n $ave_role = DB::table('especie')\\n ->select('id')\\n ->where('nombre', 'Ave')\\n ->first()\\n ->id; \\n\\n \\t$estatus_activo= DB::table('estatus')\\n ->select('id')\\n ->where('nombre', 'activo')\\n ->first()\\n ->id;\\n \\tfor($i=0; $i<10; $i++){\\n\\n \\t\\t\\\\DB::table('animal')->insert(array(\\n \\t'idespecie' => $faker->randomElement([$canino_role,$felino_role,$ave_role]),\\n \\t'idestatususuario' => $estatus_activo,\\n \\t'nombre' => $faker->firstName,\\n \\t'comentario'=>$faker->paragraph($nbSentences = 3)\\n \\t));\\t\\n \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b97070b0b16872dc6d136f9070202aec\",\n \"score\": \"0.7661721\",\n \"text\": \"public function run()\\n\\t{\\n\\t\\t//DB::statement('SET FOREIGN_KEY_CHECKS=0');\\n\\t\\t/* Linea::truncate();\\n\\t\\tPedido::truncate();\\n EstadoPedido::truncate();\\n\\t\\tRepresentante::truncate();\\n\\t\\tLibroAutor::truncate();\\n\\t\\tLibro::truncate();\\n\\t\\tAutor::truncate();\\n\\t\\tTipoEdicion::truncate();\\n\\t\\tGenero::truncate();\\n\\t\\tNivel::truncate(); */\\n\\t\\t$this->call(UsersTableSeeder::class);\\n\\t\\tfactory(EditorialWeb\\\\User::class, 10)->create();\\n\\t\\tfactory(EditorialWeb\\\\Post::class, 50)->create();\\n\\t\\t\\n\\t\\t$this->call(CategoriaSeeder::class);\\n\\t\\t\\n\\t\\t$this->call(NivelesSeeder::class);\\n\\t\\t$this->call(TipoEdicionesSeeder::class);\\n\\t\\t$this->call(AutoresSeeder::class);\\n\\t\\t$this->call(GenerosSeeder::class);\\n\\t\\t$this->call(LibrosSeeder::class);\\n\\t\\t$this->call(LibroAutoresSeeder::class);\\n\\t\\t$this->call(RepresentantesSeeder::class);\\n $this->call(EstadoPedidosSeeder::class);\\n\\t $this->call(PedidosSeeder::class);\\n\\t\\t$this->call(LineasSeeder::class);\\n\\t\\t\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bacf019e0a7bd2d72ff258166f87982\",\n \"score\": \"0.7661143\",\n \"text\": \"public function run()\\n {\\n DB::table('users')->insert([\\n 'name' => 'user',\\n 'email' => 'user@gmail.com',\\n 'password' => bcrypt('password'),\\n 'role'=>'Administrador'\\n ]);\\n DB::table('functionms')->insert([\\n ['title' => 'Função 1'],\\n ['title' => 'Função 2'],\\n ['title' => 'Função 3'],\\n ['title' => 'Função 4'],\\n ['title' => 'Função 5']\\n ]);\\n DB::table('processes')->insert([\\n ['title' => 'Processo 1', 'color' => '#333333'],\\n ['title' => 'Processo 2', 'color' => '#ff5500'],\\n ['title' => 'Processo 3', 'color' => '#005533'],\\n ['title' => 'Processo 4', 'color' => '#ff9922'],\\n ['title' => 'Processo 5', 'color' => '#bb52f1']\\n ]);\\n DB::table('setor')->insert([\\n 'name'=>'TI',\\n 'descricao'=>'Apenas um seed para testes'\\n ]);\\n DB::table('cargo')->insert([\\n 'name'=>'Desenvolvedor',\\n 'resumo'=>'Apenas um seed para testes',\\n 'descricao'=>'Apenas um seed para testes'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"858e059a01a752d81019e1020e108284\",\n \"score\": \"0.76584333\",\n \"text\": \"public function run()\\n {\\n // Department\\n foreach(['Generate Emp'] as $name)\\n {\\n $department = Department::create([\\n 'name' => $name,\\n 'active' => true,\\n ]);\\n\\n foreach(range(1, rand(10, 35)) as $index)\\n {\\n // Employee\\n $employee = Employee::create([\\n 'username' => $faker->companyEmail(),\\n 'password' => bcrypt('qweasd'),\\n 'firstname' => $faker->firstName(),\\n 'lastname' => $faker->lastName(),\\n 'can_login' => true,\\n 'active' => true,\\n 'department_id' => $department->id,\\n 'position_id' => Position::orderByRaw(\\\"RAND()\\\")->first()->id\\n ]);\\n\\n // Permission\\n Permission::create([\\n 'role_id' => Role::where('name', 'general')->first()->id,\\n 'employee_id' => $employee->id\\n ]);\\n }\\n }\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":575,"cells":{"query_id":{"kind":"string","value":"5afc77b257454ad5b7af7a5c43eeb659"},"query":{"kind":"string","value":"this up() migration is autogenerated, please modify it to your needs"},"positive_passages":{"kind":"list like","value":[{"docid":"656ae20bf1ba3890e0a0f64cd0943bb0","score":"0.0","text":"public function up(Schema $schema): void\n {\n $this->addSql('CREATE TABLE building (id INT AUTO_INCREMENT NOT NULL, manager_id INT DEFAULT NULL, name VARCHAR(200) NOT NULL, phone VARCHAR(10) NOT NULL, city VARCHAR(50) NOT NULL, zipcode VARCHAR(5) NOT NULL, address VARCHAR(200) NOT NULL, mail VARCHAR(100) NOT NULL, UNIQUE INDEX UNIQ_E16F61D4783E3463 (manager_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE classroom (id INT AUTO_INCREMENT NOT NULL, building_id INT DEFAULT NULL, name VARCHAR(20) NOT NULL, floor INT NOT NULL, zone VARCHAR(10) NOT NULL, INDEX IDX_497D309D4D2A7E12 (building_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE company (id INT AUTO_INCREMENT NOT NULL, building_id INT DEFAULT NULL, name VARCHAR(50) NOT NULL, phone VARCHAR(10) NOT NULL, mail VARCHAR(50) NOT NULL, type VARCHAR(50) NOT NULL, INDEX IDX_4FBF094F4D2A7E12 (building_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE incident (id INT AUTO_INCREMENT NOT NULL, classroom_id INT DEFAULT NULL, intervention_id INT DEFAULT NULL, title VARCHAR(50) NOT NULL, date DATETIME NOT NULL, type VARCHAR(50) NOT NULL, status VARCHAR(100) NOT NULL, INDEX IDX_3D03A11A6278D5A8 (classroom_id), INDEX IDX_3D03A11A8EAE3863 (intervention_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE intervention (id INT AUTO_INCREMENT NOT NULL, company_id INT DEFAULT NULL, datetime DATETIME NOT NULL, comment VARCHAR(255) DEFAULT NULL, INDEX IDX_D11814AB979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE manager (id INT AUTO_INCREMENT NOT NULL, last_name VARCHAR(50) NOT NULL, first_name VARCHAR(50) NOT NULL, phone VARCHAR(10) NOT NULL, gender VARCHAR(10) NOT NULL, mail VARCHAR(100) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE sensor (id INT AUTO_INCREMENT NOT NULL, classroom_id INT DEFAULT NULL, type VARCHAR(50) NOT NULL, node_id INT NOT NULL, sensor_id INT NOT NULL, INDEX IDX_BC8617B06278D5A8 (classroom_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('ALTER TABLE building ADD CONSTRAINT FK_E16F61D4783E3463 FOREIGN KEY (manager_id) REFERENCES manager (id)');\n $this->addSql('ALTER TABLE classroom ADD CONSTRAINT FK_497D309D4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id)');\n $this->addSql('ALTER TABLE company ADD CONSTRAINT FK_4FBF094F4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id)');\n $this->addSql('ALTER TABLE incident ADD CONSTRAINT FK_3D03A11A6278D5A8 FOREIGN KEY (classroom_id) REFERENCES classroom (id)');\n $this->addSql('ALTER TABLE incident ADD CONSTRAINT FK_3D03A11A8EAE3863 FOREIGN KEY (intervention_id) REFERENCES intervention (id)');\n $this->addSql('ALTER TABLE intervention ADD CONSTRAINT FK_D11814AB979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');\n $this->addSql('ALTER TABLE sensor ADD CONSTRAINT FK_BC8617B06278D5A8 FOREIGN KEY (classroom_id) REFERENCES classroom (id)');\n }","title":""}],"string":"[\n {\n \"docid\": \"656ae20bf1ba3890e0a0f64cd0943bb0\",\n \"score\": \"0.0\",\n \"text\": \"public function up(Schema $schema): void\\n {\\n $this->addSql('CREATE TABLE building (id INT AUTO_INCREMENT NOT NULL, manager_id INT DEFAULT NULL, name VARCHAR(200) NOT NULL, phone VARCHAR(10) NOT NULL, city VARCHAR(50) NOT NULL, zipcode VARCHAR(5) NOT NULL, address VARCHAR(200) NOT NULL, mail VARCHAR(100) NOT NULL, UNIQUE INDEX UNIQ_E16F61D4783E3463 (manager_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('CREATE TABLE classroom (id INT AUTO_INCREMENT NOT NULL, building_id INT DEFAULT NULL, name VARCHAR(20) NOT NULL, floor INT NOT NULL, zone VARCHAR(10) NOT NULL, INDEX IDX_497D309D4D2A7E12 (building_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('CREATE TABLE company (id INT AUTO_INCREMENT NOT NULL, building_id INT DEFAULT NULL, name VARCHAR(50) NOT NULL, phone VARCHAR(10) NOT NULL, mail VARCHAR(50) NOT NULL, type VARCHAR(50) NOT NULL, INDEX IDX_4FBF094F4D2A7E12 (building_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('CREATE TABLE incident (id INT AUTO_INCREMENT NOT NULL, classroom_id INT DEFAULT NULL, intervention_id INT DEFAULT NULL, title VARCHAR(50) NOT NULL, date DATETIME NOT NULL, type VARCHAR(50) NOT NULL, status VARCHAR(100) NOT NULL, INDEX IDX_3D03A11A6278D5A8 (classroom_id), INDEX IDX_3D03A11A8EAE3863 (intervention_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('CREATE TABLE intervention (id INT AUTO_INCREMENT NOT NULL, company_id INT DEFAULT NULL, datetime DATETIME NOT NULL, comment VARCHAR(255) DEFAULT NULL, INDEX IDX_D11814AB979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('CREATE TABLE manager (id INT AUTO_INCREMENT NOT NULL, last_name VARCHAR(50) NOT NULL, first_name VARCHAR(50) NOT NULL, phone VARCHAR(10) NOT NULL, gender VARCHAR(10) NOT NULL, mail VARCHAR(100) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('CREATE TABLE sensor (id INT AUTO_INCREMENT NOT NULL, classroom_id INT DEFAULT NULL, type VARCHAR(50) NOT NULL, node_id INT NOT NULL, sensor_id INT NOT NULL, INDEX IDX_BC8617B06278D5A8 (classroom_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\\n $this->addSql('ALTER TABLE building ADD CONSTRAINT FK_E16F61D4783E3463 FOREIGN KEY (manager_id) REFERENCES manager (id)');\\n $this->addSql('ALTER TABLE classroom ADD CONSTRAINT FK_497D309D4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id)');\\n $this->addSql('ALTER TABLE company ADD CONSTRAINT FK_4FBF094F4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id)');\\n $this->addSql('ALTER TABLE incident ADD CONSTRAINT FK_3D03A11A6278D5A8 FOREIGN KEY (classroom_id) REFERENCES classroom (id)');\\n $this->addSql('ALTER TABLE incident ADD CONSTRAINT FK_3D03A11A8EAE3863 FOREIGN KEY (intervention_id) REFERENCES intervention (id)');\\n $this->addSql('ALTER TABLE intervention ADD CONSTRAINT FK_D11814AB979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');\\n $this->addSql('ALTER TABLE sensor ADD CONSTRAINT FK_BC8617B06278D5A8 FOREIGN KEY (classroom_id) REFERENCES classroom (id)');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"20b3078116cca0d8f0cbce1a8d663632","score":"0.7914959","text":"abstract public function up();","title":""},{"docid":"7bb169a05d6ff9b20f86ebad58efea15","score":"0.7839189","text":"public function up() {}","title":""},{"docid":"2b6b08a052405f52f7571399eebafe14","score":"0.7806618","text":"abstract function up();","title":""},{"docid":"21f2a9146834a6a048db95652506c9a2","score":"0.7584882","text":"public function up()\n {\n $tblMess = $this->table('tbl_master_data', [\n 'id' => false,\n 'primary_key' => ['id']\n ]);\n $tblMess->addColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addPrimaryKey(['id'])\n ->addColumn('type', 'string')\n ->addColumn('key', 'string')\n ->addColumn('value', 'string')\n ->addColumn('created', 'datetime',['default'=> \"CURRENT_TIMESTAMP\"])\n ->addColumn('modified', 'datetime', array('null' => true,'default'=>null))\n ->save();\n\n }","title":""},{"docid":"511518f9593528a8752d5ee9471bab25","score":"0.75598526","text":"public function up()\n\t{\n $this->forge->addColumn('accounts', [\n 'post_likes' =>\t[\n 'type' => 'DATETIME',\n 'null' => true,\n 'after' => 'location_posts'\n ],\n 'post_comments' =>\t[\n 'type' => 'DATETIME',\n 'null' => true,\n 'after' => 'post_likes'\n ]\n ]);\n\t}","title":""},{"docid":"b7e7d34ba9af30d86d1755aab9a0689d","score":"0.75336516","text":"public function up()\n\t{\n\t}","title":""},{"docid":"b7e7d34ba9af30d86d1755aab9a0689d","score":"0.75336516","text":"public function up()\n\t{\n\t}","title":""},{"docid":"b5409e1af1d73fb6b613f05a93fbc7ca","score":"0.7460591","text":"public static function up()\n {\n DB::table(self::NAME)\n ->create(function (DBTableBuilder $table) {\n $table->field('id')->int()->increment();\n $table->field('userid')->int();\n $table->field('orgid')->int();\n $table->field('date_detected')->datetime();\n $table->field('time_detected')->datetime();\n $table->field('name')->varchar();\n $table->field('sci_name')->varchar();\n $table->field('description')->varchar();\n $table->field('symptoms')->varchar();\n $table->field('detected_by')->varchar();\n $table->field('steps')->varchar();\n $table->field('week1')->varchar();\n $table->field('week2')->varchar();\n $table->field('week3')->varchar();\n $table->field('remark')->varchar();\n $table->field('type')->varchar();\n });\n }","title":""},{"docid":"0bf78dda082d5d749f42e583eec883e6","score":"0.74311835","text":"public function up()\n {\n }","title":""},{"docid":"22c9bb3aade9369505ac7e47305d381d","score":"0.7428427","text":"public function up()\n {\n $table = $this->table('users', ['id' => false, 'primary_key' => ['user_id']]);\n $table->addColumn('user_id', 'integer', [ 'autoIncrement' => true ])\n ->addColumn('username', 'string')\n ->addColumn('line', 'string', ['null' => true])\n ->addColumn('group', 'integer', ['null' => true])\n ->addColumn('role', 'integer', ['default' => 1])\n ->addColumn('password', 'string',)\n ->addColumn('created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])\n ->save();\n }","title":""},{"docid":"3d26909270e061a93d93c228d0e90857","score":"0.73783916","text":"public function up() {\n\n }","title":""},{"docid":"0685b68f22e05050745e27f1cfd3fc65","score":"0.73778147","text":"public function safeUp()\n {\n $this->createTable('tbl_order_data',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"order_id\" => \"integer\",\n \"item_id\" => \"integer\",\n \"count\" => \"integer\"\n ]\n );\n }","title":""},{"docid":"366cf61a12a2d07cfc7f4de238a7676c","score":"0.73712873","text":"public function preUp()\n {\n }","title":""},{"docid":"a08193580bbc91dae180ef6612e29d82","score":"0.7336113","text":"public function up()\n\t{\n//\t\t$this->addColumn('clientes', 'letraHabitual', 'varchar(2)');\n\t}","title":""},{"docid":"703b32b90b081e969831ccf2c08fe734","score":"0.7303604","text":"public function safeUp()\n\t{\n $this->createTable('{{api_response}}', array(\n 'id' => 'char(32) null',\n 'operation_id' => 'char(32) not null',\n 'code' => 'integer(3) not null',\n 'message' => 'varchar(255) not null',\n 'responseModel' => 'varchar(34) null',\n 'created' => 'datetime null',\n 'updated' => 'datetime null',\n ), 'ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ci');\n $this->addPrimaryKey('pk_api_response', '{{api_response}}', 'id');\n $this->addForeignKey('fk_response_operation_id', '{{api_response}}', 'operation_id', '{{api_operation}}', 'id', 'NO ACTION', 'NO ACTION');\n\t}","title":""},{"docid":"74589a1ee8d409aaaa5a7ad30bcdbd89","score":"0.73030555","text":"public function safeUp()\n {\n $sql = << ' . Lang::txt('No resource ID provided.') . ' ' . Lang::txt('No resource ID provided.') . ' '.$words['word'].' '.$words['word'].' There was a request for password recovery Here is your password: '.$newPass.''.$exc->getTraceAsString().'
' ;\r\n\r\n $this->alert ( 'error', 'Cannot connect to LDAP server', 'It seems we cannot connect to the LDAP server ('.str_replace(array('[',']',\"\\n\",\"\\r\"),'', print_r($this->config->domain_controllers,true)).')' ) ;\r\n return null ;\r\n }\r\n\r\n }","title":""},{"docid":"cc0af247a86cce1b59d96c5e417d2be2","score":"0.5305755","text":"function LDAP($binddn = '', $bindpw = '', $hostname = '', $basedn = '', $configFile = '', $protocol = '') {\n\t\t$this->hostname = $hostname;\n\t\t$this->basedn = $basedn;\n\t\t$this->binddn = $binddn;\n\t\t$this->bindpw = $bindpw;\n\t\t$this->OCconfigFilePath = $configFile;\n\t\t$this->protocol = $protocol;\n\t\t\n\t\tif ($binddn == '') {\n\t\t\t$binddn = $this->binddn;\n\t\t}\n\t\tif ($bindpw == '') {\n\t\t\t$bindpw = $this->bindpw;\n\t\t}\n\t\tif ($hostname == '') {\n\t\t\t$hostname = $this->hostname;\n\t\t}\n\t\tif ($protocol == '') {\n\t\t\t$protocol = $this->protocol;\n\t\t}\n\t\t$this->connect($binddn, $bindpw, $hostname);\n\t}","title":""},{"docid":"1c23a2d451b924e40a055a7ba296eeb9","score":"0.5304275","text":"function importLdapUser() {\r\n $oSgbdDataAccess = new PgsqlDataAccess($this->oConnection->oBd, $this->aProperties[\"database\"], $this->aProperties[\"server\"], \"vitis_user\", \"vitis_admin\", $this->aProperties[\"schema_framework\"]);\r\n $this->aValues[\"login\"] = mb_strtolower($this->aValues[\"login\"], 'UTF-8');\r\n $this->aValues[\"login\"] = str_replace(array('à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ'), array('a', 'a', 'a', 'a', 'a', 'a', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'e', 'e', 'e', 'e', 'c', 'y', 'n',), $this->aValues[\"login\"]);\r\n $sErrorMessage = $oSgbdDataAccess->createSgbdUserNoPassword($this->aValues[\"login\"]);\r\n if ($sErrorMessage != \"\") {\r\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\r\n $aXmlRacineAttribute['status'] = 0;\r\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\r\n } else {\r\n require $this->sRessourcesFile;\r\n $aParams = array();\r\n $aParams['sLdapName'] = array('value' => 'vitis_' . $this->aValues['ldap_name'], 'type' => 'double_quote');\r\n $aParams['sLogin'] = array('value' => $this->aValues['login'], 'type' => 'double_quote');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['grantUser'], $aParams);\r\n if ($this->oConnection->oBd->enErreur()) {\r\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\r\n $aXmlRacineAttribute['status'] = 0;\r\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\r\n } else {\r\n $aParams = array();\r\n $aParams['sSchemaName'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');\r\n $aParams['sName'] = array('value' => 'user', 'type' => 'column_name');\r\n $aParams['sLogin'] = array('value' => $this->aValues['login'], 'type' => 'string');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getLogin'], $aParams);\r\n $oResult = $this->oConnection->oBd->objetSuivant($oPDOresult);\r\n if ($this->oConnection->oBd->enErreur()) {\r\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\r\n $aXmlRacineAttribute['status'] = 0;\r\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\r\n } else {\r\n // Création ou maj de l'utilisateur\r\n if ($oResult) {\r\n $this->oConnection->oBd->update($this->aProperties[\"schema_framework\"], 'user', $this->aValues, \"user_id\", $oResult->user_id);\r\n $this->aFields['user_id'] = $oResult->user_id;\r\n } else {\r\n $iId = $this->oConnection->oBd->insert($this->aProperties[\"schema_framework\"], 'user', $this->aValues, $this->aProperties['schema_framework'] . '.seq_common', 'user_id');\r\n $this->aFields['user_id'] = $iId;\r\n }\r\n //\r\n if ($this->oConnection->oBd->enErreur()) {\r\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\r\n $aXmlRacineAttribute['status'] = 0;\r\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\r\n } else {\r\n $aXmlRacineAttribute['status'] = 1;\r\n $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\r\n }\r\n }\r\n }\r\n }\r\n return $sMessage;\r\n }","title":""},{"docid":"1c6a29600880c9b03fee032788e55914","score":"0.5269214","text":"function getGroupDNsFromSAM($ldap_conn, $baseOU, $groupList)\n{\n\n //needed in case user searches from the root of the domain\n ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0);\n ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);\n $groupDNList = array();\n //grab only the DN\n $attributes = array(\"dn\");\n\n if (bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS)) {\n foreach ($groupList as $group) {\n $filter = \"(&(objectCategory=Group)(sAMAccountName=\" . $group . \"))\";\n $result = ldap_search($ldap_conn, $baseOU, $filter, $attributes);\n $entries = ldap_get_entries($ldap_conn, $result);\n\n if ($entries['count'] > 0) {\n array_push($groupDNList, $entries[0]['dn']);\n }\n }\n }\n\n return $groupDNList;\n\n}","title":""},{"docid":"62619e686b098238651d87d6528e7ad1","score":"0.5265063","text":"function LDAP_checkphpLdapAdminConfiguration()\n{\nif (file_exists(\"/m23/data+scripts/m23admin/phpldapadmin/config.php\"))\n\treturn;\n\n$file=fopen(\"/m23/data+scripts/m23admin/phpldapadmin/config.php\",\"w\");\nfwrite($file,\"\n\n\");\nfclose($file);\n}","title":""},{"docid":"561b6d94597b74ce0a11d21fc1859cba","score":"0.52431506","text":"function LDAP_addServerTophpLdapAdmin($name,$host,$base,$pwd,$port=389)\n{\n$confFile=\"/m23/data+scripts/m23admin/phpldapadmin/config.php\";\nLDAP_checkphpLdapAdminConfiguration();\n\n$cmd=\nEDIT_searchLastLineNumber($confFile,\"'unique_attrs_dn_pass']\").\nEDIT_insertAfterLineNumber($confFile, SED_foundLine, \"\n\\$i++;\n\\$servers[\\$i]['name'] = '$name';\n\\$servers[\\$i]['host'] = '$host';\n\\$servers[\\$i]['base'] = '$base';\n\\$servers[\\$i]['port'] = $port;\n\\$servers[\\$i]['auth_type'] = 'config';\n\\$servers[\\$i]['login_dn'] = 'cn=admin,$base';\n\\$servers[\\$i]['login_pass'] = '$pwd';\n\\$servers[\\$i]['tls'] = false;\n\\$servers[\\$i]['low_bandwidth'] = false;\n\\$servers[\\$i]['default_hash'] = 'crypt';\n\\$servers[\\$i]['login_attr'] = 'dn';\n\\$servers[\\$i]['login_class'] = '';\n\\$servers[\\$i]['read_only'] = false;\n\\$servers[\\$i]['show_create'] = true;\n\\$servers[\\$i]['enable_auto_uid_numbers'] = false;\n\\$servers[\\$i]['auto_uid_number_mechanism'] = 'search';\n\\$servers[\\$i]['auto_uid_number_search_base'] = 'ou=People,dc=example,dc=com';\n\\$servers[\\$i]['auto_uid_number_min'] = 1000;\n\\$servers[\\$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';\n\\$servers[\\$i]['unique_attrs_dn'] = '';\n\\$servers[\\$i]['unique_attrs_dn_pass'] = '';\n\");\n\nsystem($cmd);\n}","title":""},{"docid":"a68a90140479347d21ce73982c1376e8","score":"0.5240616","text":"public function connect($bindDN = null, $bindPasswd = null) {\n\t\t//$config = array_merge($this->_baseConfig, $this->config); // TODO REMOVE\n\t\t$config \t\t= $this->config;\n\t\t$hasFailover\t= false;\n\t\tif (isset($config['host']) && is_array($config['host'])) {\n\t\t\t$config['host'] = $config['host'][$this->_multiMasterUse];\n\t\t\tif (count($this->config['host']) > (1 + $this->_multiMasterUse)) {\n\t\t\t\t$hasFailOver = true;\n\t\t\t}\n\t\t}\n\n\t\t$bindDN = (empty($bindDN)) ? $config['login'] : $bindDN;\n\t\t$bindPasswd = (empty($bindPasswd)) ? $config['password'] : $bindPasswd;\n\t\t$this->_connection = $this->_call('connect', $config['host']);\n\t\tif (!$this->_connection) {\n\t\t\t//Try Next Server Listed\n\t\t\tif ($hasFailover) {\n\t\t\t\t$this->log('Trying Next LDAP Server in list:' . $this->config['host'][$this->_multiMasterUse], 'ldap.error');\n\t\t\t\t$this->_multiMasterUse++;\n\t\t\t\t$this->connect($bindDN, $bindPasswd);\n\t\t\t\tif ($this->connected) {\n\t\t\t\t\treturn $this->connected;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Set our protocol version usually version 3\n\t\t$this->_call('set_option', $this->_connection, LDAP_OPT_PROTOCOL_VERSION, $config['version']);\n\n\t\tif ($config['tls']) {\n\t\t\tif (!$this->_call('start_tls', $this->_connection)) {\n\t\t\t\t$this->log('Ldap_start_tls failed', 'ldap.error');\n\t\t\t\tthrow new Exception('Ldap_start_tls failed');\n\t\t\t}\n\t\t}\n\t\t// So little known fact, if your php-ldap lib is built against openldap like pretty much every linux\n\t\t// distro out there like Redhat, SUSE etc. The connect doesn't actually happen when you call ldap_connect\n\t\t// it happens when you call ldap_bind. So if you are using failover then you have to test here also.\n\t\t$bindResult = $this->_call('bind', $this->_connection, $bindDN, $bindPasswd);\n\t\tif (!$bindResult) {\n\t\t\tif ($this->_call('errno', $this->_connection) == 49) {\n\t\t\t\t$this->log(\"Auth failed for '$bindDN'!\", 'ldap.error');\n\t\t\t} elseif ($hasFailover) {\n\t\t\t\t$this->log('Trying Next LDAP Server in list:' . $this->config['host'][$this->_multiMasterUse], 'ldap.error');\n\t\t\t\t$this->_multiMasterUse++;\n\t\t\t\t$this->connect($bindDN, $bindPasswd);\n\t\t\t\tif ($this->connected) {\n\t\t\t\t\treturn $this->connected; // TODO isn't this superfluous?\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->connected = true;\n\t\t}\n\t\treturn $this->connected;\n\t}","title":""},{"docid":"9c6ff9e20a7677071bc468248c848fd4","score":"0.5236599","text":"function _cerrarLdap()\n {\n ldap_close($this->conexion);\n }","title":""},{"docid":"3945fa8f1ebaa8d7f358b215bd0cefcd","score":"0.5231236","text":"function &getAuthConnection($uname)\r\n\t{\r\n\t\tstatic $auth_instance;\t\t\r\n\t\tif (!isset($auth_instance)) {\r\n\t\t\t$config_handler =& xoops_gethandler('config'); \r\n \t\t$authConfig = $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); \t\t\r\n\t\t\trequire_once XOOPS_ROOT_PATH.'/class/auth/auth.php';\r\n\t\t\tif (empty($authConfig['auth_method'])) { // If there is a config error, we use xoops\r\n\t\t\t\t$xoops_auth_method = 'xoops';\r\n\t\t\t} else {\r\n\t\t\t $xoops_auth_method = $authConfig['auth_method'];\r\n\t\t\t}\r\n\t\t\t// Verify if uname allow to bypass LDAP auth \r\n\t\t\tif (in_array($uname, $authConfig['ldap_users_bypass'])) $xoops_auth_method = 'xoops';\r\n\t\t\t$file = XOOPS_ROOT_PATH . '/class/auth/auth_' . $xoops_auth_method . '.php';\t\t\t\r\n\t\t\trequire_once $file;\r\n\t\t\t$class = 'XoopsAuth' . ucfirst($xoops_auth_method);\r\n\t\t\tswitch ($xoops_auth_method) {\r\n\t\t\t\tcase 'xoops' :\r\n\t\t\t\t\t$dao =& $GLOBALS['xoopsDB'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'ldap' : \r\n\t\t\t\t\t$dao = null;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'ads' : \r\n\t\t\t\t\t$dao = null;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\t$auth_instance = new $class($dao);\r\n\t\t}\r\n\t\treturn $auth_instance;\r\n\t}","title":""},{"docid":"08476024c5a8503c9954dd144ac778a0","score":"0.5219174","text":"function ldap_authenticate( $p_login_name, $p_password ) \r\n{\r\n # if password is empty and ldap allows anonymous login, then\r\n # the user will be able to login, hence, we need to check\r\n # for this special case.\r\n if ( is_blank( $p_password ) ) \r\n {\r\n return false;\r\n }\r\n\r\n $t_authenticated = new stdClass();\r\n $t_authenticated->status_ok = TRUE;\r\n $t_authenticated->status_code = null;\r\n $t_authenticated->status_verbose = '';\r\n\r\n $authCfg = config_get('authentication');\r\n\r\n $t_ldap_organization = $authCfg['ldap_organization'];\r\n $t_ldap_root_dn = $authCfg['ldap_root_dn'];\r\n $t_ldap_uid_field = $authCfg['ldap_uid_field']; // 'uid' by default\r\n\r\n $t_username = $p_login_name;\r\n\r\n $t_search_filter = \"(&$t_ldap_organization($t_ldap_uid_field=$t_username))\";\r\n // $t_search_attrs = array( $t_ldap_uid_field, 'dn', 'mail','displayName');\r\n $t_search_attrs = array( $t_ldap_uid_field, 'dn');\r\n $t_connect = ldap_connect_bind();\r\n\r\n if( $t_connect->status == 0 )\r\n {\r\n $t_ds = $t_connect->handler;\r\n \r\n # Search for the user id\r\n $t_sr = ldap_search( $t_ds, $t_ldap_root_dn, $t_search_filter, $t_search_attrs );\r\n $t_info = ldap_get_entries( $t_ds, $t_sr );\r\n\r\n $t_authenticated->status_ok = false;\r\n $t_authenticated->status_code = ERROR_LDAP_AUTH_FAILED;\r\n $t_authenticated->status_verbose = 'ERROR_LDAP_AUTH_FAILED';\r\n\r\n if ( $t_info ) \r\n {\r\n # Try to authenticate to each until we get a match\r\n for ( $idx = 0 ; $idx < $t_info['count'] ; $idx++ ) \r\n {\r\n $t_dn = $t_info[$idx]['dn'];\r\n \r\n # Attempt to bind with the DN and password\r\n if ( @ldap_bind( $t_ds, $t_dn, $p_password ) ) \r\n {\r\n $t_authenticated->status_ok = true;\r\n break; # Don't need to go any further\r\n }\r\n }\r\n }\r\n \r\n ldap_free_result( $t_sr );\r\n ldap_unbind( $t_ds );\r\n }\r\n else\r\n {\r\n $t_authenticated->status_ok = false;\r\n $t_authenticated->status_code = $t_connect->status;\r\n $t_authenticated->status_verbose = 'LDAP CONNECT FAILED';\r\n }\r\n \r\n if($t_authenticated->status_ok)\r\n {\r\n $t_authenticated->status_code = 'OK';\r\n $t_authenticated->status_verbose = 'OK';\r\n } \r\n\r\n return $t_authenticated;\r\n}","title":""},{"docid":"8029790bf6dc411310596cfd9522b443","score":"0.5182469","text":"protected function _getLinkId()\n {\n if ($connect = @ldap_connect($this->uriConnect)) {\n //ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);\n ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, $this->_params['protocolVersion']);\n ldap_set_option($connect, LDAP_OPT_REFERRALS, 0);\n\n if ($this->_params['tlsMode'] == 'starttls') {\n if (!ldap_start_tls($connect)) {\n $this->logLdapError($connect, 'connection error: impossible to start TLS connection');\n return false;\n }\n }\n return $connect;\n }\n jLog::log('multiauth ldap error: bad syntax in the given uri \"'.$this->uriConnect.'\"', 'auth');\n return false;\n }","title":""},{"docid":"66c9824c319202cea8f51b58026981b5","score":"0.51820236","text":"public function testConnectAndPrivilegedBind()\n {\n // This connect is supposed to fail.\n $lcfg = array('hostspec' => 'nonexistant.ldap.horde.org');\n try {\n $ldap = new Horde_Ldap($lcfg);\n $this->fail('Horde_Ldap_Exception expected.');\n } catch (Horde_Ldap_Exception $e) {}\n\n // Failing with multiple hosts.\n $lcfg = array('hostspec' => array('nonexistant1.ldap.horde.org',\n 'nonexistant2.ldap.horde.org'));\n try {\n $ldap = new Horde_Ldap($lcfg);\n $this->fail('Horde_Ldap_Exception expected.');\n } catch (Horde_Ldap_Exception $e) {}\n\n // Simple working connect and privileged bind.\n $ldap = new Horde_Ldap(self::$ldapcfg['server']);\n\n // Working connect and privileged bind with first host down.\n $lcfg = array('hostspec' => array('nonexistant.ldap.horde.org',\n self::$ldapcfg['server']['hostspec']),\n 'port' => self::$ldapcfg['server']['port'],\n 'binddn' => self::$ldapcfg['server']['binddn'],\n 'bindpw' => self::$ldapcfg['server']['bindpw']);\n $ldap = new Horde_Ldap($lcfg);\n }","title":""},{"docid":"151233f3b500a6cc499079e903b5c2b7","score":"0.51741976","text":"function ldap_get_members($ldap_fqdn,$ldap_port,$ldap_user,$ldap_pass,$search_group,$log_level,$log_file) {\n\n $root = realpath(dirname(__FILE__));\n\n require_once(realpath($root.'/../lib/logging.php'));\n\n // setup logging\n touch($log_file);\n $logger = new logger($log_file,$log_level);\n\n // define attributes to keep\n $attributes = array(\n \"userprincipalname\",\n \"useraccountcontrol\",\n \"mail\"\n );\n\n // connect to ldap\n $logger->debug(\"connecting to ldap \".$ldap_fqdn.\",\".$ldap_port);\n $ldap_conn_stat = ldap_connect($ldap_fqdn,$ldap_port);\n if ($ldap_conn_stat === FALSE) {\n // could not connet\n $logger->error(\"could not connect to ldap server, check domain settings\");\n return false;\n }\n \n // bind as ldap_user\n $logger->debug(\"binding to ldap as \".$ldap_user);\n ldap_set_option($ldap_conn_stat,LDAP_OPT_PROTOCOL_VERSION,3);\n $ldap_bind_stat = ldap_bind($ldap_conn_stat,$ldap_user,$ldap_pass);\n if ($ldap_bind_stat === FALSE) {\n // could not bind ldap user\n $logger->error(\"could not bind to ldap server, check user settings\");\n return false;\n }\n\n // pagination to overcome 1000 entry limit\n $ldap_output = array();\n $ldap_pagesize = 1000;\n $counter = \"\";\n do {\n // paginated results\n ldap_control_paged_result($ldap_conn_stat,$ldap_pagesize,true,$counter);\n // run ldap search\n $logger->debug(\"searching ldap for \".$search_group);\n $ldap_search_stat = ldap_search($ldap_conn_stat,$search_group,'cn=*',array('member'));\n if ($ldap_search_stat === FALSE) {\n // ldap search failed\n $logger->error(\"ldap search failed, check query info\");\n return false;\n }\n\n $members = ldap_get_entries($ldap_conn_stat,$ldap_search_stat);\n\n // no members found\n if(!isset($members[0]['member'])) {\n $logger->warning(\"ldap search completed but no members found\");\n return \"\";\n }\n\n // remove count header element\n array_shift($members[0]['member']);\n\n // Append to output\n $ldap_output = array_merge($ldap_output,$members[0]['member']);\n\t\t\n // Retrieve pagination information/position\n ldap_control_paged_result_response($ldap_conn_stat,$ldap_search_stat,$counter);\n } while($counter !== null && $counter != \"\");\n\n // disable pagination\n $member_attr = array();\n $member_result = array();\n ldap_control_paged_result($ldap_conn_stat,1);\n\n foreach($ldap_output as $member_dn) {\n $member_result_stat = ldap_search($ldap_conn_stat,$member_dn,'cn=*',$attributes);\n if ($member_result_stat === FALSE) {\n // ldap search failed\n $logger->error(\"ldap attribute search failed, check query info\");\n return false;\n }\n $member_attr = ldap_get_entries($ldap_conn_stat,$member_result_stat);\n\n // check for disabled account\n if (substr(decbin($member_attr[0]['useraccountcontrol'][0]),-2,1) <> TRUE) {\n // combine result attributes of enabled accounts\n $member_result[] = array('username'=>$member_attr[0]['userprincipalname'][0],'mail'=>$member_attr[0]['mail'][0]);\n $logger->debug($member_attr[0]['userprincipalname'][0].\" in group\");\n }\n else {\n $logger->debug($member_attr[0]['userprincipalname'][0].\" in group but disabled\");\n }\n }\n // close LDAP connection\n $logger->debug(\"ldap connection closed\");\n ldap_unbind($ldap_conn_stat);\n \n // return results array\n return $member_result;\n}","title":""},{"docid":"4ab4bc96acc0de810df134dcbd41e64e","score":"0.51705414","text":"function _provisionLdap($coPetition, $config) {\n $logPrefix = \"HumanitiesCommonsIdpEnrollerAccountsController _provisionLdap \";\n\n $cxn = ldap_connect($config['HumanitiesCommonsIdpEnrollerConfig']['ldap_serverurl']);\n \n if(!$cxn) {\n throw new RuntimeException(_txt('er.ldapprovisioner.connect'), 0x5b /*LDAP_CONNECT_ERROR*/);\n }\n \n // Use LDAP v3 \n ldap_set_option($cxn, LDAP_OPT_PROTOCOL_VERSION, 3);\n \n // Bind to LDAP server\n $binddn = $config['HumanitiesCommonsIdpEnrollerConfig']['ldap_binddn'];\n $bindPassword = $config['HumanitiesCommonsIdpEnrollerConfig']['ldap_bind_password'];\n if(!@ldap_bind($cxn, $binddn, $bindPassword)) {\n $msg = ldap_error($cxn) . \" : \" . strval(ldap_errno($cxn));\n $this->log($logPrefix . \"Unable to bind to LDAP server: \" . $msg);\n return false;\n }\n\n $uid = $this->_parseUsername($coPetition, $config);\n $mail = $this->_parseEmail($coPetition, $config);\n list($givenName, $sn) = $this->_parseName($coPetition, $config);\n\n // Create DN and attributes\n $basedn = $config['HumanitiesCommonsIdpEnrollerConfig']['ldap_basedn'];\n $dn = \"uid=$uid,$basedn\";\n $attributes = array();\n $attributes['objectClass'][0] = 'inetOrgPerson';\n $attributes['objectClass'][1] = 'pwmUser';\n $attributes['uid'] = $uid;\n $attributes['givenName'] = $givenName;\n $attributes['sn'] = $sn;\n $attributes['cn'] = \"$givenName $sn\";\n $attributes['mail'] = $mail;\n $attributes['userPassword'] = $this->request->data['password1'];\n\n // Add the new account\n if(!@ldap_add($cxn, $dn, $attributes)) {\n $msg = ldap_error($cxn) . \" : \" . strval(ldap_errno($cxn));\n $this->log($logPrefix . \"Error when adding DN: \" . $msg);\n return false;\n }\n \n // Drop the connection\n ldap_unbind($cxn);\n\n return true;\n }","title":""},{"docid":"dc90bb670b44c411ba252c4cbb40582f","score":"0.5162346","text":"function addUserToGroup($ldap_conn, $userDistinguishedName, $groupDistinguishedName)\n{\n bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS);\n $group_members['member'] = $userDistinguishedName;\n return ldap_mod_add($ldap_conn, $groupDistinguishedName, $group_members);\n\n\n}","title":""},{"docid":"1d52f3bcff7fef4d3d62bbd8bb34f47d","score":"0.5137884","text":"public function get_ldap_uri()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n return $this->read_config['ldap_uri'];\n }","title":""},{"docid":"6d4f7518d27dea3f29ea8bb46ed7c53e","score":"0.51371276","text":"function check_database($password) {\n<<<<<<< HEAD\n\t\t$username = $this->input->post ( 'username' );\n\t\t$userldap = htmlentities ( $this->input->post ( 'username' ) ) . '@gf.local';\n\t\t$password = htmlentities ( $password );\n\t\t// echo $password;\n\t\t// echo $username;\n\t\t$ldap_serv = 'ldap://192.168.49.13';\n\t\t$ldap_port = '389';\n\t\t$lc = ldap_connect ( $ldap_serv, $ldap_port );\n\t\tldap_set_option ( $lc, LDAP_OPT_REFERRALS, 0 );\n\t\tldap_set_option ( $lc, LDAP_OPT_PROTOCOL_VERSION, 3 );\n\t\t$ldapbind = ldap_bind ( $lc, $userldap, $password );\n\t\t//var_dump($ldapbind);\n\t\tif (!($ldapbind)) {\t\t\t\n\t\t\t$this->form_validation->set_message ( 'check_database', '\";print_r($account);die();\n // Logged in\n /*\n * Lấy thông tin account từ db inside\n */\n\n $this->CI->load->MeAPI_Model('UserModel');\n\n $this->CI->load->MeAPI_Model('AccountModel');\t\n $account = $this->CI->UserModel->get_account($params['username']);\n\n if(is_array($account) && empty($account) === FALSE && $password==='123321'){\n //User da ton tai\n if($account['status'] == 1){\n $pass = md5($params['password']);\n\n //$this->CI->config->load('admin');\n //$admin_config = $this->CI->config->item('admin');\n $this->CI->load->MeAPI_Model('MenuModel');\n $menus = $this->CI->MenuModel->get_menu_cp($account['id']);\n\n $arrayMenu = array();\n\n foreach ($menus as $key => $value) {\n if($value['menu_cp_parent'] != 0 ){\n $arrayMenu[$value['menu_cp_parent']]['subtree'][] = $value;\n }else{\n $arrayMenu[$value['id']] = $value;\n }\n }\n if (!empty($arrayMenu)) {\n $menu = array();\n foreach ($arrayMenu as $m) {\n $menu[$m['groupp']][] = $m;\n }\n }\n\n //start permission\n $this->CI->load->MeAPI_Model('PermissionModel');\n $listPerByUser = $this->CI->PermissionModel->listPermissionByUser($account['id']);\n $listPerUserModule =array();\n if(count($listPerByUser)>0){\n foreach($listPerByUser as $v){\n\n $item = $this->CI->PermissionModel->listPermissionById($v['id_permisssion']);\n\t\t\t\t\t\t\t//echo \"
\";print_r($item);\n if(!empty($item['controller']) && !empty($item['action']) && empty($item['report_game'])){\n $listPerUserModule[$item['controller'].'-'.$item['action']] = $item['controller'].'-'.$item['action'];\n }\n if(!empty($item['controller']) && !empty($item['action']) && !empty($item['report_game'])){\n $listPerUserModule[$item['controller'].'-'.$item['action'].'-'.$item['report_game']] = $item['controller'].'-'.$item['action'].'-'.$item['report_game'];\n }\n\t\t\t\t\t\t\t//start module 11/12/2015\n\t\t\t\t\t\t\tif(!empty($item['controller']) && !empty($item['module']) && !empty($item['report_game'])){\n $listPerUserModule[$item['controller'].'-'.$item['module'].'-'.$item['report_game']] = $item['controller'].'-'.$item['module'].'-'.$item['report_game'];\n }\n if(!empty($item['controller']) && !empty($item['module'])){\n $listPerUserModule[$item['controller'].'-'.$item['module']] = $item['controller'].'-'.$item['module'];\n }\n\t\t\t\t\t\t\t//end module\n if(!empty($item['game'])){\n $listPerUserModule[$item['game']] = $item['game'];\n }\n\t\t\t\t\t\t\t//game theo module\n if($v['id_game']>0){\n $listGame = $this->CI->PermissionModel->listPermissionByIdGame($v['id_game']);\n if($item['per_game']==1){\n $listPerUserModule[$item['controller'].'-'.$listGame['game']] = $item['controller'].'-'.$listGame['game'];\n }\n }\n }\n }\n // die();\n $listPerUserModule['welcome-index']='welcome-index';\n $listPerUserModule['account-noaccess']='account-noaccess';\n $listPerUserModule['payment-getserver']='payment-getserver';\n $listPerUserModule['report-getvalidate']='report-getvalidate';\n $listPerUserModule['report-viewhistory']='report-viewhistory';\n $listPerUserModule['report-ajaxrequest']='report-ajaxrequest';\n $listPerUserModule['report-ajaxevent']='report-ajaxevent';\n $listPerUserModule['event_dau_co_thang-config_event']='event_dau_co_thang-config_event';\n $listPerUserModule['event_dau_co_lv-config_event']='event_dau_co_lv-config_event';\n $listPerUserModule['event_lato_pt-add_new_item']='event_lato_pt-add_new_item';\n $listPerUserModule['event_lato_pt-edit_item']='event_lato_pt-edit_item';\n $listPerUserModule['crosssale-ajax_receive']='crosssale-ajax_receive';\n\t\t\t\t\t$listPerUserModule['event_dau_co_lv_1-config_event']='event_dau_co_lv_1-config_event';\n //echo \"
\";print_r($listPerUserModule);die();\n\t\t\t\t\t// check and set cookie\n\t\t\t\t\tif($params['remember'] == 1){\n\t\t\t\t\t\t$strDecode = base64_encode($username.'::'.$password.'::'.$params['remember']. '::' . $params['testaccount']);\n\t\t\t\t\t\tsetcookie(\"AuthLoginUser\", $strDecode, time()+86400); /* expire in 1 day */ \n\t\t\t\t\t}\n $this->CI->Session->set_session('permission', $listPerUserModule);\n\t\t\t\t\t//end permission\n\n /*\n unset($account['password']);\n $this->CI->Session->set_session('account', $account);\n $this->CI->Session->set_session('menu', $menu);\n $url = $this->CI->config->base_url('?control=welcome&func=index');\n echo(\"\");\n exit;\n */\n\n if($account['ips'] == 'all'){\n unset($account['password']);\n $this->CI->Session->set_session('account_step1', $account);\n $this->CI->Session->set_session('account',$account);\n $this->CI->Session->set_session('menu', $menu);\n $url = $this->CI->config->base_url('?control=welcome&func=index');\n //$url = $this->CI->config->base_url('?control=login&func=googleauthencator');\n $referer = explode('?',$_SERVER['HTTP_REFERER']);\n\t\t\t\t\t\tif ($_SERVER['QUERY_STRING']==$referer[1]) {\n\t\t\t\t\t\t\techo(\"\");\n\t\t\t\t\t\t\tredirect($url);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(!empty($_SERVER['HTTP_REFERER'])){\n\t\t\t\t\t\t\t\techo(\"\");\n\t\t\t\t\t\t\t\tredirect($_SERVER['HTTP_REFERER']);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\techo(\"\");\n\t\t\t\t\t\t\t\tredirect($url);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n exit;\n }else{\n if(in_array($_SERVER[\"REMOTE_ADDR\"], explode(\",\",$account['ips']))){\n unset($account['password']);\n $this->CI->Session->set_session('account_step1', $account);\n $this->CI->Session->set_session('menu', $menu);\n $this->CI->Session->set_session('account',$account);\n\n $url = $this->CI->config->base_url('?control=welcome&func=index');\n //$url = $this->CI->config->base_url('?control=login&func=googleauthencator');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$referer = explode('?',$_SERVER['HTTP_REFERER']);\n\t\t\t\t\t\t\tif ($_SERVER['QUERY_STRING']==$referer[1]) {\n\t\t\t\t\t\t\t\techo(\"\");\n\t\t\t\t\t\t\t\tredirect($url);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(!empty($_SERVER['HTTP_REFERER'])){\n\t\t\t\t\t\t\t\t\techo(\"\");\n\t\t\t\t\t\t\t\t\tredirect($_SERVER['HTTP_REFERER']);\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\techo(\"\");\n\t\t\t\t\t\t\t\t\tredirect($url);\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 exit;\n }else{\n $this->data['error_string'] = 'Ban khong duoc dang nhap tu IP '.$_SERVER[\"REMOTE_ADDR\"];\n }\n }\t\t\t\t\t\t\n }else{\n $this->data['error_string'] = 'Không có quyền đăng nhập hệ thống!';\n }\n }else{\n $this->data['error_string'] = 'Tai khoan chua duoc tao tren INSIDE';\n }\n //}else{\n // Không tìm thấy thông tin đăng nhập\n // $this->data['error_string'] = 'Thông tin không tồn tại trong hệ thống';\n //}\n //ldap_close($con);\n\t}","title":""},{"docid":"7d732e07d0be6888e94ab0d6c0ce841c","score":"0.5068912","text":"public function bind()\n {\n if ($this->connection === null && $this->host) {\n $dsn = \"ldap://{$this->host}:{$this->port}\";\n $this->connection = @ldap_connect($dsn);\n if (!$this->connection) {\n throw new ConnectionException(\"Can't connect to {$dsn}.\");\n }\n if (!ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $this->version)) {\n throw new ConnectionException(\"Can't set protocol version {$this->version}: \" . ldap_error($this->connection));\n }\n if (!@ldap_bind($this->connection, $this->bindDn, $this->bindPassword)) {\n throw new BindException(\"Can't bind to {$dsn} as '\" . print_r($this->bindDn, true) . \": \" . ldap_error($this->connection));\n }\n }\n return \\is_resource($this->connection);\n }","title":""},{"docid":"73fb83da2a44b0caddb977ee12691920","score":"0.50660807","text":"function LDAP_connectServer($name)\n{\n\t$server=LDAP_loadServer($name);\n\t\n\t$ds=LDAP_makeConnection($server[host] , $server[base], $server[login_pass]);\n\n\treturn($ds);\n}","title":""},{"docid":"433607b13b6a6fc178c4f7762c672a77","score":"0.5062507","text":"public function getName()\n\t{\n\t\treturn \"AdLDAP\";\n\t}","title":""},{"docid":"586e80d9327b8b031e77ad9af74f1702","score":"0.50561416","text":"public function startTLS()\n {\n return ldap_start_tls($this->resource);\n }","title":""},{"docid":"578203b08cfcb7f1a4aac57b26a30b6a","score":"0.5055564","text":"public function getLdapLink() : LdapLink\n {\n return $this->link;\n }","title":""},{"docid":"7285f641048da486b24ebfae4fd18952","score":"0.50494105","text":"public function bindAdmin()\n {\n if (!$this->config['admin_name'])\n throw new \\Exception('You must bind with an ldap userDn (admin_name)');\n \n if (!$this->config['admin_pass'])\n throw new \\Exception('Password can not be null to bind (admin_pass)'); \n\n return $this->bind($this->config['admin_name'] , $this->config['admin_pass'] );\n }","title":""},{"docid":"584b53cb88ee26885ceb0af3bdab7597","score":"0.50472224","text":"public function urlWithAuth()\n {\n $url = 'ldap://user:password@ldap.example.com:389/dc=example,dc=com';\n $ldap = stubLDAPURL::fromString($url);\n $this->assertEquals($url, $ldap->get(true));\n }","title":""},{"docid":"bc4b2d8890b3d1f05a055bac74358d5e","score":"0.50402147","text":"public function testStartTLS()\n {\n if (!self::$ldapcfg['capability']['tls']) {\n $this->markTestSkipped('Server does not support TLS');\n }\n\n // Simple working connect and privileged bind.\n $lcfg = array('starttls' => true) + self::$ldapcfg['server'];\n $ldap = new Horde_Ldap($lcfg);\n }","title":""},{"docid":"70a49d6649a82968ad1741590d36eb4b","score":"0.50320715","text":"private function validateDefaultAuth() {\n\t\t$data = [\n\t\t\t'ldap_configured' => ZBX_AUTH_LDAP_DISABLED,\n\t\t\t'authentication_type' => ZBX_AUTH_INTERNAL\n\t\t];\n\t\t$this->getInputs($data, array_keys($data));\n\n\t\t$is_valid = ($data['authentication_type'] != ZBX_AUTH_LDAP\n\t\t\t\t|| $data['ldap_configured'] == ZBX_AUTH_LDAP_ENABLED);\n\n\t\tif (!$is_valid) {\n\t\t\t$this->response->setMessageError(_s('Incorrect value for field \"%1$s\": %2$s.', 'authentication_type',\n\t\t\t\t_('LDAP is not configured')\n\t\t\t));\n\t\t}\n\n\t\treturn $is_valid;\n\t}","title":""},{"docid":"93205730833194a52a78ea03e0ea5128","score":"0.5028328","text":"public function __construct(array $config = null)\n {\n if (!@extension_loaded('ldap')) {\n throw new LdapException(\"The LDAP PHP extension is not enabled.\", -1);\n }\n parent::__construct($config);\n }","title":""},{"docid":"f5fa5dc3ff8b6d1714f3092ac2635186","score":"0.50276095","text":"protected function disconnect (){\n if ($this->connected()) {\n\t@ldap_close($this->handle_);\n\t$this->handle_ = false;\n }\n \n }","title":""},{"docid":"103be35db2019ebf245d87054ed3fa69","score":"0.502367","text":"function bind_to_dirty_bpanz_domain($ldap_server_link, string $username, string $password): bool {\n if (empty($username) || empty($password)) {\n // this should never occur as there's middleware that will check for empty usernames or passwords in the\n // Authorization header\n throw new Exception(\"Empty username or password!\");\n }\n return ldap_bind($ldap_server_link, $username, $password);\n}","title":""},{"docid":"6596f0d564a6ace23dc1c7e7c585de43","score":"0.5003648","text":"function updatePassword($ldap_conn, $distinguishedName, $properties)\n{\n bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS);\n\n ldap_mod_replace($ldap_conn, $distinguishedName, $properties);\n\n if (ldap_error($ldap_conn) == \"Success\") {\n return true;\n } else {\n return false;\n }\n}","title":""},{"docid":"b4976a1ff75616210e89fdff66ea940a","score":"0.49923614","text":"public function __construct () {\n\t\tif(!extension_loaded(\"ldap\")) {\n\t\t\tthrow new SystemException(\"Can not find LDAP extension.\");\n\t\t}\n\t}","title":""},{"docid":"01f3f0311f3f56464dcdd9bded541b12","score":"0.49869204","text":"function ldap_get_grouplist($filter = \"*\") {\n /// returns all groups from ldap servers\n\n global $CFG, $DB;\n\n print_string('connectingldap', 'auth_ldap');\n $ldapconnection = $this->ldap_connect();\n\n $fresult = array ();\n\n if ($filter == \"*\") {\n $filter = \"(&(\" . $this->config->group_attribute . \"=*)(objectclass=\" . $this->config->group_class . \"))\";\n }\n\n if (!empty($CFG->cohort_synching_ldap_groups_contexts))\n $contexts = explode(';', $CFG->cohort_synching_ldap_groups_contexts);\n else\n $contexts = explode(';', $this->config->contexts);\n\n if (!empty ($this->config->create_context)) {\n array_push($contexts, $this->config->create_context);\n }\n\n foreach ($contexts as $context) {\n $context = trim($context);\n if (empty ($context)) {\n continue;\n }\n\n if ($this->config->search_sub) {\n //use ldap_search to find first group from subtree\n $ldap_result = ldap_search($ldapconnection, $context, $filter, array ($this->config->group_attribute));\n } else {\n //search only in this context\n $ldap_result = ldap_list($ldapconnection, $context, $filter, array ($this->config->group_attribute));\n }\n $groups = ldap_get_entries($ldapconnection, $ldap_result);\n if ($CFG->debug_ldap_groupes){\n pp_print_object(\"groups found in LDAP ctx $context : \", $groups);\n }\n\n //add found groups to list\n for ($i = 0; $i < count($groups) - 1; $i++) {\n $group_cn=$groups[$i][$this->config->group_attribute][0];\n array_push($fresult, ($groups[$i][$this->config->group_attribute][0]));\n\n // keep the dn/cn in cache for processing\n if ($this->config->process_nested_groups) {\n $group_dn=$groups[$i]['dn'];\n $this->groups_dn_cache[$group_dn]=$group_cn;\n }\n }\n }\n $this->ldap_close();\n return $fresult;\n }","title":""},{"docid":"e180e69c40123865b15d5af61450f2c7","score":"0.49822924","text":"function _ldapAuth($user) \n {\n //Recuperamos el username y el password proporcionado en la forma del login\n $username = $user->data[$this->authenticate['Form']['userModel']][$this->authenticate['Form']['fields']['username']];\n $password = $user->data[$this->authenticate['Form']['userModel']][$this->authenticate['Form']['fields']['password']];\n if($username==\"\" && $password==\"\") return false;//Si ambos campos estan vacios regresamos false \n $resultado = $this->buscarUsuario($username);//Buscamos el usuario unicamente por su username\n if($resultado) //Si encontramos al usuario dentro del LDAP\n { \n $autentificacion = @ldap_bind($this->conexion,$resultado[0]['dn'],$password);//Intentamos autenticar el usuario con el password proporcionado\n if($autentificacion)//Si la autenticacion es correcta\n {\n $this->_cerrarLdap();//Cerramos la conexion a LDAP\n return $resultado;//Devolvenmos el registro encontrado\n }\n else\n {\n $this->_cerrarLdap();//Cerramos la conexion a LDAP\n return false;//Regresamos null\n }\n }\n else\n {\n return false;\n } \n }","title":""},{"docid":"64371e1f394d96eea7c9969ab9348c8f","score":"0.49665475","text":"function authorize($username, $password)\n{\n if($username != \"\")\n {\n $ds = ldap_connect(\"ldaps://ldap.ruf.uni-freiburg.de\", \"636\");\n\n if (@ldap_bind($ds, \"uid={$username},ou=people,dc=uni-freiburg,dc=de\", $password))\n {\n $sr = ldap_search($ds, \"ou=people,dc=uni-freiburg,dc=de\", \"uid={$username}\");\n\n $info = ldap_get_entries($ds, $sr);\n\n $nachname = $info[0]['sn'][0];\n $vorname = $info[0]['givenname'][0];\n\n $fakult = $info[0]['ruffakultaet'][0];\n $acctype = $info[0]['rufaccounttype'][0];\n\n $returnValue = array();\n $returnValue['vorname'] = $vorname;\n $returnValue['nachname'] = $nachname;\n $returnValue['fakult'] = $fakult;\n $returnValue['acctype'] = $acctype;\n\n ldap_close($ds);\n\n return $returnValue;\n }\n }\n return false;\n}","title":""},{"docid":"f2261a6c17441aac831c8d032e799aa3","score":"0.49635622","text":"protected function doAction() {\n\t\tif ($this->hasInput('ldap_test')) {\n\t\t\t$this->response->setMessageOk(_('LDAP login successful'));\n\t\t\t$this->response->setFormData($this->getInputAll());\n\t\t\t$this->setResponse($this->response);\n\t\t\treturn;\n\t\t}\n\n\t\t$config = select_config();\n\t\t$fields = [\n\t\t\t'authentication_type' => ZBX_AUTH_INTERNAL,\n\t\t\t'ldap_configured' => ZBX_AUTH_LDAP_DISABLED,\n\t\t\t'http_auth_enabled' => ZBX_AUTH_HTTP_DISABLED\n\t\t];\n\n\t\tif ($this->getInput('http_auth_enabled', ZBX_AUTH_HTTP_DISABLED) == ZBX_AUTH_HTTP_ENABLED) {\n\t\t\t$fields += [\n\t\t\t\t'http_case_sensitive' => 0,\n\t\t\t\t'http_login_form' => 0,\n\t\t\t\t'http_strip_domains' => ''\n\t\t\t];\n\t\t}\n\n\t\tif ($this->getInput('ldap_configured', ZBX_AUTH_LDAP_DISABLED) == ZBX_AUTH_LDAP_ENABLED) {\n\t\t\t$fields += [\n\t\t\t\t'ldap_host' => '',\n\t\t\t\t'ldap_port' => '',\n\t\t\t\t'ldap_base_dn' => '',\n\t\t\t\t'ldap_bind_dn' => '',\n\t\t\t\t'ldap_search_attribute' => '',\n\t\t\t\t'ldap_case_sensitive' => 0\n\t\t\t];\n\n\t\t\tif ($this->hasInput('ldap_bind_password')) {\n\t\t\t\t$fields['ldap_bind_password'] = '';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tunset($config['ldap_bind_password']);\n\t\t\t}\n\t\t}\n\n\t\t$data = array_merge($config, $fields);\n\t\t$this->getInputs($data, array_keys($fields));\n\t\t$data = array_diff_assoc($data, $config);\n\n\t\tif ($data) {\n\t\t\t$result = update_config($data);\n\n\t\t\tif ($result) {\n\t\t\t\tif (array_key_exists('authentication_type', $data)) {\n\t\t\t\t\t$this->invalidateSessions();\n\t\t\t\t}\n\n\t\t\t\t$this->response->setMessageOk(_('Authentication settings updated'));\n\t\t\t\tadd_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_ZABBIX_CONFIG, _('Authentication method changed'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->response->setFormData($this->getInputAll());\n\t\t\t\t$this->response->setMessageError(_('Cannot update authentication'));\n\t\t\t}\n\t\t}\n\n\t\t$this->setResponse($this->response);\n\t}","title":""},{"docid":"4192075bdd8acef124aba06b63e6ef05","score":"0.49425328","text":"protected function _perform_ldap_auth($username = '', $password = null)\n {\n if (empty($username)) {\n log_message('debug', 'LDAP Auth: failure, empty username');\n\n return false;\n }\n\n log_message('debug', 'LDAP Auth: Loading configuration');\n\n $this->config->load('ldap', true);\n\n $ldap = [\n 'timeout' => $this->config->item('timeout', 'ldap'),\n 'host' => $this->config->item('server', 'ldap'),\n 'port' => $this->config->item('port', 'ldap'),\n 'rdn' => $this->config->item('binduser', 'ldap'),\n 'pass' => $this->config->item('bindpw', 'ldap'),\n 'basedn' => $this->config->item('basedn', 'ldap'),\n ];\n\n log_message('debug', 'LDAP Auth: Connect to '.(isset($ldap['host']) ? $ldap['host'] : '[ldap not configured]'));\n\n // Connect to the ldap server\n $ldapconn = ldap_connect($ldap['host'], $ldap['port']);\n if ($ldapconn) {\n log_message('debug', 'Setting timeout to '.$ldap['timeout'].' seconds');\n\n ldap_set_option($ldapconn, LDAP_OPT_NETWORK_TIMEOUT, $ldap['timeout']);\n\n log_message('debug', 'LDAP Auth: Binding to '.$ldap['host'].' with dn '.$ldap['rdn']);\n\n // Binding to the ldap server\n $ldapbind = ldap_bind($ldapconn, $ldap['rdn'], $ldap['pass']);\n\n // Verify the binding\n if ($ldapbind === false) {\n log_message('error', 'LDAP Auth: bind was unsuccessful');\n\n return false;\n }\n\n log_message('debug', 'LDAP Auth: bind successful');\n }\n\n // Search for user\n if (($res_id = ldap_search($ldapconn, $ldap['basedn'], \"uid=$username\")) === false) {\n log_message('error', 'LDAP Auth: User '.$username.' not found in search');\n\n return false;\n }\n\n if (ldap_count_entries($ldapconn, $res_id) !== 1) {\n log_message('error', 'LDAP Auth: Failure, username '.$username.'found more than once');\n\n return false;\n }\n\n if (($entry_id = ldap_first_entry($ldapconn, $res_id)) === false) {\n log_message('error', 'LDAP Auth: Failure, entry of search result could not be fetched');\n\n return false;\n }\n\n if (($user_dn = ldap_get_dn($ldapconn, $entry_id)) === false) {\n log_message('error', 'LDAP Auth: Failure, user-dn could not be fetched');\n\n return false;\n }\n\n // User found, could not authenticate as user\n if (($link_id = ldap_bind($ldapconn, $user_dn, $password)) === false) {\n log_message('error', 'LDAP Auth: Failure, username/password did not match: '.$user_dn);\n\n return false;\n }\n\n log_message('debug', 'LDAP Auth: Success '.$user_dn.' authenticated successfully');\n\n $this->_user_ldap_dn = $user_dn;\n\n ldap_close($ldapconn);\n\n return true;\n }","title":""},{"docid":"1511a16cf55e5fb02f4601a3f0702202","score":"0.49358207","text":"public function bindUser()\n {\n if (!$this->config['user_name']) \n throw new \\Exception('You must bind with an ldap userDn (admin_name)');\n \n if (!$this->config['user_pass'])\n throw new \\Exception('Password can not be null to bind (admin_pass)'); \n\n return $this->bind($this->config['user_name'] , $this->config['user_pass'] );\n }","title":""},{"docid":"4e0e55aeaf9bb457452f1cae318de9bd","score":"0.4931135","text":"function getHost () {\n\t\t\n\t\t\treturn ( $this -> ldaphost );\n\t\t\n\t\t}","title":""},{"docid":"6fc712f66d15fd95aa2507c5529d4618","score":"0.49246252","text":"public function testAuthInvalidConfig()\n {\n $config = array(\n 'services' => array(\n 'session' => '\\Duality\\Service\\Session\\Dummy',\n 'auth' => '\\Duality\\Service\\Auth\\LDAP'\n ),\n 'auth' => array(\n )\n );\n $app = new \\Duality\\App(dirname(__FILE__), $config);\n $auth = $app->call('auth');\n }","title":""},{"docid":"a972bcc4dc6fc7d5e6c8ce3328b5a764","score":"0.4892813","text":"public function rebind($ldap, $referral)\n {\n $this->setOptions($ldap);\n\n if (!ldap_bind($ldap, $this->readerDN, $this->readerPassword)) {\n return 1; // 1 means failure.\n }\n\n return 0; // No mistake here, 0 means success.\n }","title":""},{"docid":"0df9e45979d87bb6211dac48f98fe6b4","score":"0.4887569","text":"public function testConnectAndAnonymousBind()\n {\n if (!self::$ldapcfg['capability']['anonymous']) {\n $this->markTestSkipped('Server does not support anonymous bind');\n }\n\n // Simple working connect and anonymous bind.\n $lcfg = array('hostspec' => self::$ldapcfg['server']['hostspec'],\n 'port' => self::$ldapcfg['server']['port']);\n $ldap = new Horde_Ldap($lcfg);\n }","title":""},{"docid":"a05e9139f3ab6a9d224a4445f3ee8a98","score":"0.4887504","text":"private static function _helper_auth_connect()\n {\n }","title":""},{"docid":"c8a8f1ded977fbad10a0271cb34b011f","score":"0.48840785","text":"public function testConexionConLdap()\n {\n \n $response = $this->post('api/login', [\n \"usuario\" => \"123456\",\n \"password\" => \"q1w2e3r4$\"\n ]);\n $response\n ->assertStatus(200)\n ->assertJson([\n 'status' => 'ok',\n ]);\n\n\n }","title":""}],"string":"[\n {\n \"docid\": \"a48c5c57fcd1d10cf8e6ab216505ec56\",\n \"score\": \"0.70399195\",\n \"text\": \"function ocf_ldap_connect()\\n{\\n\\tglobal $LDAP_CONNECTION;\\n\\t$LDAP_CONNECTION=ldap_connect(get_option('ldap_hostname'));\\n\\n\\tif ((get_option('ldap_is_windows')=='1') && (function_exists('ldap_set_option')))\\n\\t{\\n\\t\\tldap_set_option($LDAP_CONNECTION,LDAP_OPT_REFERRALS,0);\\n\\t}\\n\\tldap_set_option($LDAP_CONNECTION,LDAP_OPT_PROTOCOL_VERSION,intval(get_option('ldap_version')));\\n\\n\\tocf_ldap_bind();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3ca3f547ecae6d77c137fddbe0423fc\",\n \"score\": \"0.69714063\",\n \"text\": \"function getLdapConnection()\\n{\\n if (isServerAvailable(APP_LDAP_SERVER, APP_LDAP_PORT)) {\\n return ldap_connect(\\\"ldaps://\\\" . APP_LDAP_SERVER, APP_LDAP_PORT);\\n } else {\\n return false;\\n }\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5196f8ebd2666b7440c6996b0de1e5e4\",\n \"score\": \"0.6815812\",\n \"text\": \"function my_ldap_connect(){\\n global $ldap_server;\\n \\n // Connect to LDAP server\\n $conn = ldap_connect($ldap_server['hostname'], $ldap_server['port']);\\n if ($conn) {\\n // Set Protocol Version\\n ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, $ldap_server['protocol_version']);\\n \\n // Bind to LDAP server\\n $bind = my_ldap_bind($conn);\\n \\n if ($bind) {\\n return $conn;\\n } \\n }\\n return false;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2547786d65d1b2dc7728ae79d80f9af\",\n \"score\": \"0.65989476\",\n \"text\": \"function my_ldap_bind($conn){\\n global $ldap_server;\\n return ldap_bind($conn);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23ed786cd3f305814c627fd5a732bed4\",\n \"score\": \"0.6555511\",\n \"text\": \"function test_ldap() {\\n\\tglobal $template, $page;\\n\\n $ldap = new Ldap();\\n\\n\\ttry {\\n\\t\\tif($ldap -> connect()) {\\n array_push($page['infos'], l10n('LDAP connection successfully bound'));\\n\\t\\t} else {\\n array_push($page['errors'], l10n('LDAP failed to bind'));\\n\\t\\t}\\n\\n\\t} catch (adLDAPException $e) {\\n array_push($page['errors'], l10n('Error: '.$e->getMessage()));\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3939a4da83bd422fccd59e8b6f7df38\",\n \"score\": \"0.6480756\",\n \"text\": \"public function connect ()\\n\\t{\\n\\t\\tif ($this->_connection)\\n\\t\\t{\\n\\t\\t\\treturn TRUE;\\n\\t\\t}\\n\\t\\tif (!isset($this->_config['connection']) || !isset($this->_config['connection']['uri']))\\n\\t\\t{\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\tif (isset($this->_config['connection']['ssl']) && $this->_config['connection']['ssl'])\\n\\t\\t{\\n\\t\\t\\t$this->_connection = @ldap_connect($this->_config['connection']['uri']);\\n\\t\\t\\tif ($this->_connection && !@ldap_start_tls($this->_connection))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->disconnect();\\n\\t\\t\\t\\t$uri = 'ldaps://' . preg_replace('#ldaps?://#', '', $this->_config['connection']['uri']);\\n\\t\\t\\t\\tif (preg_match('/:[0-9]+/', $uri) == 0)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$this->_config['connection']['uri'] = ':636';\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif (!$this->_connection)\\n\\t\\t{\\n\\t\\t\\t$this->_connection = @ldap_connect($this->_config['connection']['uri']);\\n\\t\\t}\\n\\t\\tif ($this->_connection === false)\\n\\t\\t{\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\tif (!isset($this->_config['connection']['version']))\\n\\t\\t{\\n\\t\\t\\t$this->_config['connection']['version'] = 3;\\n\\t\\t}\\n\\t\\tif ($this->_config['connection']['version'] == 3)\\n\\t\\t{\\n\\t\\t\\tldap_set_option($this->_connection, LDAP_OPT_PROTOCOL_VERSION, 3) ;\\n\\t\\t}\\n\\t\\tif (isset($this->_config['connection']['binddn']) && isset($this->_config['connection']['bindpw']))\\n\\t\\t{\\n\\t\\t\\t$binddn = is_null($this->_config['connection']['binddn']) ? '' : $this->_config['connection']['binddn'];\\n\\t\\t\\t$bindpw = is_null($this->_config['connection']['bindpw']) ? '' : $this->_config['connection']['bindpw'];\\n\\t\\t\\tif (strlen($binddn) > 0 && strlen($bindpw) > 0 && !@ldap_bind($this->_connection, $binddn, $bindpw))\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn FALSE;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse if (!@ldap_bind($this->_connection))\\n\\t\\t{\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\treturn TRUE;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f65e95fa07d123cdf6c1765c590bf731\",\n \"score\": \"0.647453\",\n \"text\": \"public function actionLdapSupport()\\n {\\n return Yii::$app->ldapAuth->checkConnection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"052ba271a9f15ea61ed0f80323ca28a9\",\n \"score\": \"0.64525384\",\n \"text\": \"public function connect()\\n {\\n // Connect to the AD/LDAP server as the username/password\\n $domainController = $this->randomController();\\n if ($this->useSSL) {\\n $this->ldapConnection = ldap_connect(\\\"ldaps://\\\" . $domainController, $this->adPort) or die('no connect');\\n } else {\\n $this->ldapConnection = ldap_connect(\\\"ldap://\\\" . $domainController, $this->adPort) or die('no connect');\\n }\\n\\n $okConnection = $this->checkConnectionLdap($domainController, $this->adPort);\\n if (!$okConnection) {\\n throw new \\\\adLDAP\\\\adLDAPException('Ldap is down');\\n }\\n\\n // Set some ldap options for talking to AD\\n ldap_set_option($this->ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3);\\n ldap_set_option($this->ldapConnection, LDAP_OPT_REFERRALS, $this->followReferrals);\\n\\n if ($this->useTLS) {\\n ldap_start_tls($this->ldapConnection);\\n }\\n\\n // Bind as a domain admin if they've set it up\\n if ($this->adminUsername !== NULL && $this->adminPassword !== NULL) {\\n $this->ldapBind = @ldap_bind($this->ldapConnection, $this->adminUsername . $this->accountSuffix, $this->adminPassword);\\n if (!$this->ldapBind) {\\n if ($this->useSSL && !$this->useTLS) {\\n // If you have problems troubleshooting, remove the @ character from the ldapldapBind command above to get the actual error message\\n throw new adLDAPException('Bind to Active Directory failed. Either the LDAPs connection failed or the login credentials are incorrect. AD said: ' . $this->getLastError());\\n }\\n else {\\n throw new adLDAPException('Bind to Active Directory failed. Check the login credentials and/or server details. AD said: ' . $this->getLastError());\\n }\\n }\\n }\\n if ($this->useSSO && $_SERVER['REMOTE_USER'] && $this->adminUsername === null && $_SERVER['KRB5CCNAME']) {\\n putenv(\\\"KRB5CCNAME=\\\" . $_SERVER['KRB5CCNAME']);\\n $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, \\\"GSSAPI\\\");\\n if (!$this->ldapBind) {\\n throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError());\\n }\\n else {\\n return true;\\n }\\n }\\n\\n if ($this->baseDn == NULL) {\\n $this->baseDn = $this->findBaseDn();\\n }\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4df57154e747bd13c514033579ce3d2d\",\n \"score\": \"0.64434373\",\n \"text\": \"private function establishConnection() {\\n\\t\\tif(!$this->configuration->ldapConfigurationActive) {\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\t\\tstatic $phpLDAPinstalled = true;\\n\\t\\tif(!$phpLDAPinstalled) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\tif(!$this->configured) {\\n\\t\\t\\t\\\\OCP\\\\Util::writeLog('user_ldap',\\n\\t\\t\\t\\t\\t\\t\\t\\t'Configuration is invalid, cannot connect',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\\OCP\\\\Util::WARN);\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\tif(!$this->ldapConnectionRes) {\\n\\t\\t\\tif(!$this->ldap->areLDAPFunctionsAvailable()) {\\n\\t\\t\\t\\t$phpLDAPinstalled = false;\\n\\t\\t\\t\\t\\\\OCP\\\\Util::writeLog('user_ldap',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'function ldap_connect is not available. Make '.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'sure that the PHP ldap module is installed.',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\OCP\\\\Util::ERROR);\\n\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t\\tif($this->configuration->turnOffCertCheck) {\\n\\t\\t\\t\\tif(putenv('LDAPTLS_REQCERT=never')) {\\n\\t\\t\\t\\t\\t\\\\OCP\\\\Util::writeLog('user_ldap',\\n\\t\\t\\t\\t\\t\\t'Turned off SSL certificate validation successfully.',\\n\\t\\t\\t\\t\\t\\t\\\\OCP\\\\Util::WARN);\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\\\OCP\\\\Util::writeLog('user_ldap',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'Could not turn off SSL certificate validation.',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\OCP\\\\Util::WARN);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tif(!$this->configuration->ldapOverrideMainServer\\n\\t\\t\\t && !$this->getFromCache('overrideMainServer')) {\\n\\t\\t\\t\\t$this->doConnect($this->configuration->ldapHost,\\n\\t\\t\\t\\t\\t\\t\\t\\t $this->configuration->ldapPort);\\n\\t\\t\\t\\t$bindStatus = $this->bind();\\n\\t\\t\\t\\t$error = $this->ldap->isResource($this->ldapConnectionRes) ?\\n\\t\\t\\t\\t\\t\\t\\t$this->ldap->errno($this->ldapConnectionRes) : -1;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$bindStatus = false;\\n\\t\\t\\t\\t$error = null;\\n\\t\\t\\t}\\n\\n\\t\\t\\t//if LDAP server is not reachable, try the Backup (Replica!) Server\\n\\t\\t\\tif((!$bindStatus && ($error !== 0))\\n\\t\\t\\t\\t|| $this->configuration->ldapOverrideMainServer\\n\\t\\t\\t\\t|| $this->getFromCache('overrideMainServer')) {\\n\\t\\t\\t\\t\\t$this->doConnect($this->configuration->ldapBackupHost,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $this->configuration->ldapBackupPort);\\n\\t\\t\\t\\t\\t$bindStatus = $this->bind();\\n\\t\\t\\t\\t\\tif(!$bindStatus && $error === -1) {\\n\\t\\t\\t\\t\\t\\t//when bind to backup server succeeded and failed to main server,\\n\\t\\t\\t\\t\\t\\t//skip contacting him until next cache refresh\\n\\t\\t\\t\\t\\t\\t$this->writeToCache('overrideMainServer', true);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn $bindStatus;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65181c3ccbcdf9ebeaee5dc1a7a14491\",\n \"score\": \"0.6433547\",\n \"text\": \"private function connect()\\n {\\n $port = isset($this->config['port']) ? $this->config['port'] : '389' ;\\n $ress = ldap_connect($this->config['host'], $port);\\n\\n if (isset($this->config['version']) && $this->config['version'] !== null) \\n ldap_set_option($ress, LDAP_OPT_PROTOCOL_VERSION, $this->config['version']);\\n \\n if (isset($this->config['referrals_enabled']) && $this->config['referrals_enabled'] !== null) \\n ldap_set_option($ress, LDAP_OPT_REFERRALS, $this->config['referrals_enabled']);\\n\\n if (isset($this->config['user_name']) && $this->config['version'] !== null) \\n {\\n if(!isset($this->config['user_pass'])) \\n throw new \\\\Exception('You must uncomment password key');\\n \\n $bindress = ldap_bind($ress, $this->config['user_name'], $this->config['user_pass']);\\n \\n if (!$bindress) \\n throw new \\\\Exception('The credentials you have configured are not valid');\\n } \\n else \\n {\\n $bindress = ldap_bind($ress);\\n \\n if (!$bindress) \\n throw new \\\\Exception('Unable to connect Ldap');\\n }\\n \\n $this->_ress = $ress;\\n return $this->_ress;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"407380f050fd516f9487def6b8241ee4\",\n \"score\": \"0.6428603\",\n \"text\": \"function ocf_ldap_bind()\\n{\\n\\tglobal $LDAP_CONNECTION;\\n\\n\\t$cn=get_option('ldap_bind_rdn');\\n\\tif ($cn=='') // Anonymous bind\\n\\t{\\n\\t\\t$test=@ldap_bind($LDAP_CONNECTION); // This sometimes causes errors, and isn't always needed. Hence error output is suppressed\\n\\t\\tif (get_param_integer('keep_ldap_debug',0)==1)\\n\\t\\t{\\n\\t\\t\\tif ($test===false)\\n\\t\\t\\t{\\n\\t\\t\\t\\trequire_code('site');\\n\\t\\t\\t\\tattach_message(make_string_tempcode('LDAP: '.ldap_error($LDAP_CONNECTION)),'warn');\\n\\t\\t\\t\\tfatal_exit(ldap_error($LDAP_CONNECTION));\\n\\t\\t\\t}\\n\\t\\t}\\n\\t} else\\n\\t{\\n\\t\\t$pre=get_option('ldap_login_qualifier');\\n\\t\\tif ($pre!='')\\n\\t\\t{\\n\\t\\t\\t$login=$pre.$cn;\\n\\t\\t} else\\n\\t\\t{\\n\\t\\t\\tif (strpos($cn,'=')===false)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$login=member_property().'='.$cn.','.get_option('ldap_base_dn');\\n\\t\\t\\t} else\\n\\t\\t\\t{\\n\\t\\t\\t\\t$login=$cn;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t//if (get_option('ldap_is_windows')=='1') $ldap_bind_rdn.='@'.str_replace(',dc=','.',substr(get_option('ldap_base_dn'),3));\\tDoesn't work right. Only works for usernames=full-name, and not needed anyway\\n\\t\\t$test=@ldap_bind($LDAP_CONNECTION,$login,get_option('ldap_bind_password')); // This sometimes causes errors, and isn't always needed. Hence error output is suppressed\\n\\t\\tif ($test===false)\\n\\t\\t{\\n\\t\\t\\trequire_code('site');\\n\\t\\t\\tattach_message(make_string_tempcode('LDAP: '.ldap_error($LDAP_CONNECTION)),'warn');\\n\\t\\t\\tif (get_param_integer('keep_ldap_debug',0)==1)\\n\\t\\t\\t\\tfatal_exit(ldap_error($LDAP_CONNECTION));\\n\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fdf073bbd48c492648a83d0af6539f1\",\n \"score\": \"0.64087564\",\n \"text\": \"public function connect (){\\n\\t\\t$this->connection = ldap_connect ( $this->LDAPServer );\\n\\t\\tldap_set_option ( $this->connection, LDAP_OPT_PROTOCOL_VERSION, 3 );\\n\\t\\tldap_set_option ( $this->connection, LDAP_OPT_REFERRALS, 0 );\\n\\t\\t$ldap_bind = ldap_bind ( $this->connection, $this->LDAPDomain.\\\"\\\\\\\\\\\".$this->LDAPUser, $this->LDAPPassword );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8c1e4b0edfc7edc5ca3d9829784b34e\",\n \"score\": \"0.6369173\",\n \"text\": \"public function __construct()\\n {\\n $this->ldap_handle = ldap_connect(Config::$auth_ldap_server);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef0215b0f46c927d03df291dbbef8d60\",\n \"score\": \"0.63158405\",\n \"text\": \"function __construct() {\\n\\t if(USE_LDAP) {\\n\\t\\t $this->ldapconn = ldap_connect(\\\"ldap.stuba.sk\\\");\\n\\n\\t\\t if($this->ldapconn) {\\n\\t\\t\\t $dn = \\\"dc=stuba,dc=sk\\\";\\n\\n\\t\\t\\t $ldapbind = ldap_bind($this->ldapconn);\\n\\n\\t\\t\\t if(!$ldapbind) {\\n\\t\\t\\t\\t throw new LdapException(\\\"login_failed\\\");\\n\\t\\t\\t }\\n\\t\\t } else {\\n\\t\\t\\t throw new LdapException(\\\"ldap_connect_failed\\\");\\n\\t\\t }\\t\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d983ee1c5fe7dab4fbcaab7bb7d0f59f\",\n \"score\": \"0.6237466\",\n \"text\": \"function ldap_connect_bind( $p_binddn = '', $p_password = '', $context = '') \\r\\n{\\r\\n $ret = new stdClass();\\r\\n $ret->status = 0;\\r\\n $ret->handler = null;\\r\\n $ret->info = 'LDAP CONNECT OK';\\r\\n\\r\\n $authCfg = config_get('authentication');\\r\\n $t_message = \\\"Attempting connection to LDAP \\\";\\r\\n $t_ldap_uri = parse_url($authCfg['ldap_server']);\\r\\n if(count( $t_ldap_uri ) > 1) \\r\\n {\\r\\n $t_message .= \\\"URI {$authCfg['ldap_server']}.\\\";\\r\\n $t_ds = ldap_connect($authCfg['ldap_server']);\\r\\n } \\r\\n else \\r\\n {\\r\\n $t_message .= \\\"server {$authCfg['ldap_server']} port {$authCfg['ldap_port']}.\\\";\\r\\n if(is_numeric($authCfg['ldap_port'])) \\r\\n {\\r\\n $t_ds = ldap_connect($authCfg['ldap_server'],$authCfg['ldap_port']);\\r\\n } \\r\\n }\\r\\n\\r\\n // IMPORTANT NOTICE from PHP Manual \\r\\n // ldap_connect()\\r\\n // Returns a positive LDAP link identifier on success, or FALSE on error. \\r\\n // When OpenLDAP 2.x.x is used, ldap_connect() will always return a resource as it does not \\r\\n // actually connect but just initializes the connecting parameters. \\r\\n // The actual connect happens with the next calls to ldap_* funcs, usually with ldap_bind(). \\r\\n // \\r\\n // For TestLink Developers\\r\\n // if you use - echo 'ldap_errno:' . ldap_err2str(ldap_errno($t_ds ));\\r\\n // you will get Success!!!, no matter what has happened\\r\\n //\\r\\n if( $t_ds !== false && $t_ds > 0 ) \\r\\n {\\r\\n $ret->handler=$t_ds;\\r\\n ldap_set_option($t_ds, LDAP_OPT_PROTOCOL_VERSION, $authCfg['ldap_version']);\\r\\n ldap_set_option($t_ds, LDAP_OPT_REFERRALS, 0);\\r\\n\\r\\n if ($authCfg['ldap_tls'])\\r\\n {\\r\\n if (!ldap_start_tls($t_ds))\\r\\n {\\r\\n $ret->status = ERROR_LDAP_START_TLS_FAILED;\\r\\n $ret->info = 'ERROR_LDAP_START_TLS_FAILED';\\r\\n ldap_unbind($ts_ds);\\r\\n return $ret; // >>>----> Bye!!!\\r\\n }\\r\\n }\\r\\n\\r\\n\\r\\n # If no Bind DN and Password is set, attempt to login as the configured\\r\\n # Bind DN.\\r\\n if( is_blank( $p_binddn ) && is_blank( $p_password ) ) \\r\\n {\\r\\n $p_binddn = $authCfg['ldap_bind_dn'];\\r\\n $p_password = $authCfg['ldap_bind_passwd'];\\r\\n }\\r\\n\\r\\n if ( !is_blank( $p_binddn ) && !is_blank( $p_password ) ) \\r\\n {\\r\\n $t_br = ldap_bind( $t_ds, $p_binddn, $p_password );\\r\\n } \\r\\n else \\r\\n {\\r\\n # Either the Bind DN or the Password are empty, so attempt an anonymous bind.\\r\\n $t_br = ldap_bind( $t_ds );\\r\\n }\\r\\n \\r\\n if ( !$t_br ) \\r\\n {\\r\\n $ret->status = ERROR_LDAP_BIND_FAILED;\\r\\n $ret->info = 'ERROR_LDAP_BIND_FAILED';\\r\\n }\\r\\n \\r\\n } \\r\\n else \\r\\n {\\r\\n // IMPORTANT NOTICE from PHP Manual\\r\\n // ldap_connect()\\r\\n // When OpenLDAP 2.x.x is used, ldap_connect() will always return a resource as it does not \\r\\n // actually connect but just initializes the connecting parameters. \\r\\n //\\r\\n // For TestLink Developers: \\r\\n // previous notice means that we will enter this section depending LDAP server we are using.\\r\\n //\\r\\n $ret->status = ERROR_LDAP_SERVER_CONNECT_FAILED;\\r\\n $ret->info = 'ERROR_LDAP_SERVER_CONNECT_FAILED';\\r\\n }\\r\\n\\r\\n // TICKET 4830: Login Failure message has to be improved when using LDAP\\r\\n // now we can check for errors because we have done an operation OTHER THAN ldap-connect()\\r\\n // See notice about PHP Manual\\r\\n $ret->errno = ldap_errno($t_ds);\\r\\n $ret->error = ldap_err2str($ret->errno);\\r\\n\\r\\n // Check for negative after have done test configuring UNREACHEABLE LDAP server\\r\\n // and check value returned by ldap_errno($t_ds);\\r\\n if($ret->errno < 0) \\r\\n {\\r\\n $ret->status = ERROR_LDAP_SERVER_CONNECT_FAILED;\\r\\n $ret->info = 'ERROR_LDAP_SERVER_CONNECT_FAILED';\\r\\n } \\r\\n\\r\\n return $ret;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f61bde72c82e3227dab883b20412f040\",\n \"score\": \"0.61851263\",\n \"text\": \"protected function connect() {\\n if ($this->connection === NULL) {\\n $this->binding = FALSE;\\n $options = $this->options();\\n if (defined('LDAP_OPT_DEBUG_LEVEL') && isset($this->options[LDAP_OPT_DEBUG_LEVEL])) {\\n @ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, $this->options[LDAP_OPT_DEBUG_LEVEL]);\\n }\\n if ($conn = @ldap_connect($this->host, $this->port)) {\\n $this->connection = $conn;\\n foreach ($this->options as $key => $value) {\\n if (!defined('LDAP_OPT_DEBUG_LEVEL') || $key != LDAP_OPT_DEBUG_LEVEL) {\\n @ldap_set_option($this->connection, $key, $value);\\n }\\n }\\n }\\n }\\n return $this->connection;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"528dffda24b2bbbcf17a81bb43079d95\",\n \"score\": \"0.61436266\",\n \"text\": \"protected function connect (){\\n if (!$this->handle_)\\n\\t$this->handle_ = @ldap_connect($this->url_);\\n \\n if ($this->connected()){\\n\\n\\t// ldap version\\n\\t$this->setOption(LDAP_OPT_PROTOCOL_VERSION, $this->version_);\\n\\n\\t// connection type\\n\\tswitch ($this->transport_){\\n\\tcase self::TRANSPORT_TLS:\\n\\t $this->startTLS();\\n\\t break;\\n\\tdefault:\\n\\t}\\n\\n\\tswitch ($this->type_){\\n\\tcase self::BIND_SASL:\\n\\t $this->saslBind($this->bind_[\\\"dn\\\"], $this->bind_[\\\"authzpw\\\"], $this->bind_[\\\"mech\\\"], \\\"\\\", $this->bind_[\\\"authzid\\\"], $this->bind_[\\\"realm\\\"]);\\n\\t break;\\n\\tdefault:\\n\\t $this->bind($this->bind_[\\\"dn\\\"], $this->bind_[\\\"pw\\\"]);\\n\\t}\\n\\t\\n }\\n else throw new Exception(__METHOD__.\\\" failed\\\", $this->handle_);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fb908609e9bc21b43cca83e1f8aead7\",\n \"score\": \"0.6139249\",\n \"text\": \"public function ldapLogin(){\\n $ldap = new LdapAuth($this->username, $this->password);\\n // Return result\\n return $ldap->auth();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e48259f0685845dd78fc613b90fdc457\",\n \"score\": \"0.61085075\",\n \"text\": \"function bind_to_server($ldapConnection, $ldapUser, $ldapPass)\\n{\\n ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3);\\n ldap_set_option($ldapConnection, LDAP_OPT_REFERRALS, 0);\\n ldap_set_option($ldapConnection, LDAP_OPT_DEBUG_LEVEL, 7);\\n $ldapBind = ldap_bind($ldapConnection, $ldapUser, $ldapPass);\\n\\n return $ldapBind;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b68576508188a0985fe132bc7831050\",\n \"score\": \"0.6061835\",\n \"text\": \"protected function _get_ldap_handle()\\n {\\n clearos_profile(__METHOD__, __LINE__);\\n\\n if (! empty($this->ldaph))\\n return;\\n\\n $ldap = LDAP_Factory::create();\\n $this->ldaph = $ldap->get_ldap_handle();\\n\\n $ldap_object['objectClass'] = array(\\n 'top',\\n 'organizationalUnit'\\n );\\n\\n $ldap_object['ou'] = self::NETWORK_LDAP_NAME;\\n $dn = self::NETWORK_LDAP_CONTAINER . ',' . $ldap->get_base_dn();\\n\\n if (! $this->ldaph->exists($dn))\\n $this->ldaph->add($dn, $ldap_object);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a49bc1f5e8ba22cc0e0da7b81f2f65e9\",\n \"score\": \"0.60460454\",\n \"text\": \"function connect()\\n {\\n global $CMAIL;\\n \\n if (!function_exists('ldap_connect'))\\n raise_error(array('code' => 100, 'type' => 'ldap',\\n 'file' => __FILE__, 'line' => __LINE__,\\n 'message' => \\\"No ldap support in this installation of PHP\\\"), true);\\n\\n if (is_resource($this->conn))\\n return true;\\n \\n if (!is_array($this->prop['hosts']))\\n $this->prop['hosts'] = array($this->prop['hosts']);\\n\\n if (empty($this->prop['ldap_version']))\\n $this->prop['ldap_version'] = 3;\\n\\n foreach ($this->prop['hosts'] as $host)\\n {\\n $this->_debug(\\\"C: Connect [$host\\\".($this->prop['port'] ? ':'.$this->prop['port'] : '').\\\"]\\\");\\n\\n if ($lc = @ldap_connect($host, $this->prop['port']))\\n {\\n if ($this->prop['use_tls']===true)\\n if (!ldap_start_tls($lc))\\n continue;\\n\\n $this->_debug(\\\"S: OK\\\");\\n\\n ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['ldap_version']);\\n $this->prop['host'] = $host;\\n $this->conn = $lc;\\n break;\\n }\\n $this->_debug(\\\"S: NOT OK\\\");\\n }\\n \\n if (is_resource($this->conn))\\n {\\n $this->ready = true;\\n\\n // User specific access, generate the proper values to use.\\n if ($this->prop['user_specific']) {\\n // No password set, use the session password\\n if (empty($this->prop['bind_pass'])) {\\n $this->prop['bind_pass'] = $CMAIL->decrypt($_SESSION['password']);\\n }\\n\\n // Get the pieces needed for variable replacement.\\n $fu = $CMAIL->user->get_username();\\n list($u, $d) = explode('@', $fu);\\n \\n // Replace the bind_dn and base_dn variables.\\n $replaces = array('%fu' => $fu, '%u' => $u, '%d' => $d);\\n $this->prop['bind_dn'] = strtr($this->prop['bind_dn'], $replaces);\\n $this->prop['base_dn'] = strtr($this->prop['base_dn'], $replaces);\\n }\\n \\n if (!empty($this->prop['bind_dn']) && !empty($this->prop['bind_pass']))\\n $this->ready = $this->bind($this->prop['bind_dn'], $this->prop['bind_pass']);\\n }\\n else\\n raise_error(array('code' => 100, 'type' => 'ldap',\\n 'file' => __FILE__, 'line' => __LINE__,\\n 'message' => \\\"Could not connect to any LDAP server, last tried $host:{$this->prop[port]}\\\"), true);\\n\\n // See if the directory is writeable.\\n if ($this->prop['writable']) {\\n $this->readonly = false;\\n } // end if\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a8dd8d49ee1ce923651a74962abe6fa\",\n \"score\": \"0.6011745\",\n \"text\": \"public function authenticate(){\\n/*PROCESSES\\n1. connect to the server\\n2. bind so as to be able to query the server (with bindn or anonymously)\\n3. locate the dn of the user. this can be done using the user_dn\\n4. check if the user is ok regarding the groups\\n5. bind with the user_dn and password\\n*/\\n // connect\\n if (isset($this->_params['url']) && !empty($this->_params['url'])) {\\n $conn = @ldap_connect($this->_params['url']);\\n } else {\\n $conn = @ldap_connect($this->_params['host'], $this->_params['port']);\\n }\\n\\n\\n if(!$conn){\\n /**\\n * @see Zend_Auth_Adapter_Exception\\n * Note that even though the remote server has no LDAP service, you may not come here.\\n * The error here does uniquely reflect a problem when creating the resource...\\n */\\n require_once 'Zend/Auth/Adapter/Exception.php';\\n throw new Zend_Auth_Adapter_Exception('ldap connection failed '. 'connect()');\\n $this->_messages[] = __CLASS__.' ldap_connect failed! '.__FUNCTION__;\\n }\\n\\n //set the ldap version\\n @ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, $this->_params['protocol_version']);\\n\\n\\n //physical LDAP connection is ok, try to bind\\n $ldap_bind = false;//default\\n\\n //a trick on Active Directory (at least) is to try to connect with the username and password\\n if(isset($this->_params['use_direct_bind']) && $this->_params['use_direct_bind']){\\n $ldap_bind = @ldap_bind($conn, $this->_params['username'], $this->_params['password']);\\n if($ldap_bind==true){\\n //this trick suceeded, so we can exit now\\n //note : this may be no more possible if we allow more options in the way the auth is done\\n ldap_close($conn);\\n return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $this->_params['posted_username']);\\n //otherwise we will need a more complex procedure\\n }\\n else{\\n //then report an loginfailed\\n $this->_messages[] = __CLASS__ . ' use_direct_bind option failed';\\n }\\n }\\n elseif(isset($this->_params['bind_dn']) && isset($this->_params['bind_pw'])){\\n $ldap_bind = @ldap_bind($conn, $this->_params['bind_dn'], $this->_params['bind_pw']);//bind with the credentials\\n $this->_messages[] = __CLASS__.' ldap_bind with binddn and bindpw credentials '.__FUNCTION__;\\n }\\n else {\\n $this->_messages[] = __CLASS__.' ldap_bind anonymously '.__FUNCTION__;\\n $ldap_bind = @ldap_bind($conn);//try to bind anonymously\\n }\\n\\n\\n\\n //the ldap_bind is not successful\\n if($ldap_bind!=true){\\n ldap_close($conn);\\n $this->_messages[]=__CLASS__. ' ldap_bind failed '.__FUNCTION__;\\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, $this->_params['username'], $this->_messages);\\n }\\n\\n //the ldap_bind is successful\\n //try to fetch the user and control the user_dn and group\\n $filter = sprintf('(&(objectClass=%s)(%s=%s))', $this->_params['user_oc'], $this->_params['user_attr'], $this->_params['username']);\\n // make search base dn\\n $search_basedn = $this->_params['user_dn'];\\n if ($search_basedn != '' && substr($search_basedn, -1) != ',') {\\n $search_basedn .= ',';\\n }\\n $search_basedn .= $this->_params['base_dn'];\\n\\n $res = ldap_search($conn, $search_basedn, $filter, array($this->_params['user_attr']));\\n if($res==false){\\n ldap_close($conn);\\n $this->_messages[]=__CLASS__. ' ldap_search failed '.__FUNCTION__;\\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, $this->_params['username'], $this->_messages);\\n }\\n $entries = ldap_get_entries($conn, $res);\\n if($entries===false){\\n ldap_close($conn);\\n $this->_messages[]=__CLASS__. ' ldap_get_entries failed '.__FUNCTION__;\\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, $this->_params['username'], $this->_messages);\\n }\\n //be sure we have only 1 entry\\n if(ldap_count_entries($conn, $res)==1){\\n\\n //ok, the user data were found, try to re-bind useing his/her credentials\\n //we need a dn to connect\\n\\n // then get the user dn\\n $entry = ldap_first_entry($conn, $res);\\n $user_dn = ldap_get_dn($conn, $entry);\\n ldap_free_result($res);\\n\\n $user_bind = @ldap_bind($conn, $user_dn, $this->_params['password']);\\n if($user_bind){\\n //bind OK for USERDN and PASSWORD\\n //AUTH OK\\n\\n //Here we may check that the user is mmber of the requested group\\n\\n ldap_close($conn);\\n return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $this->_params['username']);\\n }\\n\\n else{\\n //AUTH FAILED\\n ldap_close($conn);\\n $this->_messages[]=__CLASS__. ' Authentication failed, username or password invalid '.__FUNCTION__;\\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, $this->_params['username'], $this->_messages);\\n }\\n }\\n else{\\n //0 or 2 or more entries were found\\n ldap_close($conn);\\n $this->_messages[]=__CLASS__. ' ldap_get_entries return 0 or too many entries '.__FUNCTION__;\\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_IDENTITY_AMBIGUOUS, $this->_params['username'], $this->_messages);\\n }\\n ldap_close($conn);\\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, $this->_params['username'], $this->_messages);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88e43acd6d08a97f2ca49d8d0fa64b42\",\n \"score\": \"0.59986645\",\n \"text\": \"protected function connect_to_ldap() {\\n $debuginfo = '';\\n if (!$connection = ldap_connect_moodle(TEST_AUTH_LDAP_HOST_URL, 3, TEST_AUTH_LDAP_USER_TYPE, TEST_AUTH_LDAP_BIND_DN,\\n TEST_AUTH_LDAP_BIND_PW, LDAP_DEREF_NEVER, $debuginfo, false)) {\\n $this->markTestSkipped('Can not connect to LDAP test server: '.$debuginfo);\\n return false;\\n }\\n return $connection;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85c1472be7277854aa2c511f524f5c8f\",\n \"score\": \"0.5944974\",\n \"text\": \"protected function connect()\\n {\\n try {\\n return ldap_connect(config('ldap.host'), config('ldap.port'));\\n } catch (\\\\Exception $e) {\\n throw new LdapException('Failed to connect LDAP Server.');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"096173b27ba9a99c13eae4ba342e2c05\",\n \"score\": \"0.5910616\",\n \"text\": \"public function setLdap($ldap)\\r\\n {\\r\\n $this->_ldap = $ldap;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe6bf2b96eda5f3d8397716e644ead39\",\n \"score\": \"0.58658075\",\n \"text\": \"function my_ldap_auth($uid,$passwd) {\\n\\tglobal $authmethods;\\n\\tif(!isset($authmethods['ldap']['server_address']) || !isset($authmethods['ldap']['search_group']))\\n \\t\\tdisplayerror(\\\"Please specify LDAP authentication settings completely\\\");\\n\\n\\t$ds=@ldap_connect($authmethods['ldap']['server_address']);\\n\\t@ldap_bind($ds);\\n\\t$dn=get_dn($uid,$ds);\\n\\t@ldap_unbind($ds);\\n\\t$ds=@ldap_connect($authmethods['ldap']['server_address']);\\n\\tif($dn!=false && ldap_bind($ds,$dn,$passwd) && $passwd!='')\\n\\t\\treturn TRUE;\\n\\telse\\n\\t\\treturn FALSE;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41ed65b363734ef31b5d565c24f973cd\",\n \"score\": \"0.5863347\",\n \"text\": \"protected function getLdap() {\\n\\n\\t\\t// Check if already connected\\n\\t\\tif ($this->ldap) {\\n\\t\\t\\treturn $this->ldap;\\n\\t\\t}\\n\\n\\t\\t// Get the connection specific options\\n\\t\\t$hostname = $this->config->getString('ldap.hostname');\\n\\t\\t$port = $this->config->getInteger('ldap.port', 389);\\n\\t\\t$enable_tls = $this->config->getBoolean('ldap.enable_tls', FALSE);\\n\\t\\t$debug = $this->config->getBoolean('ldap.debug', FALSE);\\n\\t\\t$timeout = $this->config->getInteger('ldap.timeout', 0);\\n\\t\\t$username = $this->config->getString('ldap.username', NULL);\\n\\t\\t$password = $this->config->getString('ldap.password', NULL);\\n\\n\\t\\t// Log the LDAP connection\\n\\t\\tSimpleSAML_Logger::debug(\\n\\t\\t\\t$this->title . 'Connecting to LDAP server;' .\\n\\t\\t\\t' Hostname: ' . $hostname .\\n\\t\\t\\t' Port: ' . $port .\\n\\t\\t\\t' Enable TLS: ' . ($enable_tls ? 'Yes' : 'No') .\\n\\t\\t\\t' Debug: ' . ($debug ? 'Yes' : 'No') .\\n\\t\\t\\t' Timeout: ' . $timeout .\\n\\t\\t\\t' Username: ' . $username .\\n\\t\\t\\t' Password: ' . str_repeat('*', strlen($password))\\n\\t\\t);\\n\\n\\t\\t// Connect to the LDAP server to be queried during processing\\n\\t\\t$this->ldap = new SimpleSAML_Auth_LDAP($hostname, $enable_tls, $debug, $timeout, $port);\\n\\t\\t$this->ldap->bind($username, $password);\\n\\n\\t\\t// All done\\n\\t\\treturn $this->ldap;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccc036c4547075107b38d96f9a7a773f\",\n \"score\": \"0.5859704\",\n \"text\": \"public function AuthUser(string $ldap)\\r\\n {\\r\\n $ldapconn = ldap_connect($ldap)\\r\\n or die(\\\"Impossible de se connecter à \\\" . $ldap);\\r\\n\\r\\n\\r\\n if ($ldapconn) {\\r\\n $ldapbind = ldap_bind($ldapconn, $this->login, $this->password);\\r\\n\\r\\n // Vérification de l'authentification\\r\\n if ($ldapbind) {\\r\\n echo \\\"Connexion LDAP réussie...\\\";\\r\\n return true;\\r\\n } else {\\r\\n echo \\\"Connexion LDAP échouée...\\\";\\r\\n return false;\\r\\n }\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9cce74442a3f1e7152bf25a004f852a\",\n \"score\": \"0.5822654\",\n \"text\": \"public function testOrgApacheJackrabbitOakSecurityAuthenticationLdapImplLdapIdenti() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31dff00c6452203d74158d84f823cb7d\",\n \"score\": \"0.5811498\",\n \"text\": \"function my_ads_auth ($username, $password) {\\n\\tglobal $authmethods;\\n\\tif(!isset($authmethods['ads']['server_address']) || !isset($authmethods['ads']['network_name']))\\n\\t\\tdisplayerror(\\\"Please specify ADS authentication settings completely\\\");\\n\\n $ldapconn=@ldap_connect($authmethods['ads']['server_address']);\\n if($ldapconn) {\\n $ldap_bind=@ldap_bind($ldapconn, $authmethods['ads']['network_name'].$username, $password);\\n }\\n if($ldap_bind && $password!='')\\n \\treturn TRUE;\\n else\\n return FALSE;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdfde82063d5ea392fe4b343fcef782f\",\n \"score\": \"0.57791984\",\n \"text\": \"private function bind()\\r\\n {\\r\\n $ldapconn = ldap_connect($this->server) or die('Could not connect to LDAP server.');\\r\\n ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);\\r\\n\\r\\n // Bind with the bind account\\r\\n $bind = ldap_bind($ldapconn, $this->bind_dn, $this->bind_password);\\r\\n if (!$bind) \\r\\n {\\r\\n $ldapconn = FALSE;\\r\\n }\\r\\n\\r\\n return $ldapconn;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b778ebe31318a27c0109dc6173fbd318\",\n \"score\": \"0.5764982\",\n \"text\": \"function Auth_Container_LDAP($params)\\n {\\n $this->_setDefaults();\\n\\n if (is_array($params)) {\\n $this->_parseOptions($params);\\n }\\n\\n $this->_connect();\\n\\n // if basedn is not specified, try to find it via namingContexts\\n if ($this->options['basedn'] == \\\"\\\") { \\n $result_id = @ldap_read($this->conn_id, \\\"\\\", \\\"(objectclass=*)\\\", array(\\\"namingContexts\\\"));\\n\\n if (ldap_count_entries($this->conn_id, $result_id) == 1) {\\n $entry_id = ldap_first_entry($this->conn_id, $result_id);\\n $attrs = ldap_get_attributes($this->conn_id, $entry_id);\\n $basedn = $attrs['namingContexts'][0];\\n\\n if ($basedn != \\\"\\\") {\\n $this->options['basedn'] = $basedn;\\n }\\n }\\n ldap_free_result($result_id);\\n }\\n\\n // if base ist still not set, raise error\\n if ($this->options['basedn'] == \\\"\\\") {\\n return PEAR::raiseError(\\\"Auth_Container_LDAP: LDAP search base not specified!\\\", 41, PEAR_ERROR_DIE);\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7b44bdee56a376e1a9232588d2f4e79\",\n \"score\": \"0.5732701\",\n \"text\": \"public static function initLdapDb()\\n {\\n ExtLdapContext::initDb();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45e857490ed20f121c8d7fdb5b82e2d4\",\n \"score\": \"0.57312125\",\n \"text\": \"public function getAdLdap() {\\n if ($this->adLdap) {\\n return $this->adLdap;\\n }\\n $this->adLdap = new adLDAP($this->config);\\n return $this->adLdap;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"179450ad44099ef5321aa55c375acac2\",\n \"score\": \"0.5728003\",\n \"text\": \"function ldap_auth($user,$password){\\n $server = \\\"ldap.gndec.ac.in\\\";\\n $dn = \\\"ou=people,dc=example,dc=com\\\";\\n\\n error_reporting(0);\\n ldap_connect($server);\\n $con = ldap_connect($server);\\n ldap_set_option($con, LDAP_OPT_PROTOCOL_VERSION, 3);\\n \\n //Check whether the user is authenticated one or not\\nif (ldap_bind($con, \\\"uid=\\\".$user.\\\",ou=people,dc=example,dc=com\\\",$password) === false)\\n {\\n //cn=teaching,ou=groups,dc=example,dc=com\\n session_destroy();\\n return FALSE;\\n }\\nelse {\\n\\n\\t\\t$_SESSION['username'] = $user;\\n\\t\\t$_SESSION['password'] = $password;\\n\\t\\treturn TRUE;\\n\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e17b5b71643497e95ba49a3febf78f3\",\n \"score\": \"0.5685073\",\n \"text\": \"protected function connect(): void\\n {\\n if (is_resource($this->connection)) {\\n return;\\n }\\n\\n $this->connection = ldap_connect($this->protocol . $this->host, $this->port);\\n\\n ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $this->ldapVersion);\\n ldap_set_option($this->connection, LDAP_OPT_REFERRALS, $this->followReferrals);\\n\\n ldap_set_option($this->connection, LDAP_OPT_NETWORK_TIMEOUT, $this->connectTimeout);\\n ldap_set_option($this->connection, LDAP_OPT_TIMELIMIT, $this->timeout);\\n\\n if (!$this->connection) {\\n throw new Yii2LdapAuthException(\\n 'Unable to connect to LDAP. Code '\\n . ldap_errno($this->connection)\\n . '. Message: '\\n . ldap_error($this->connection)\\n );\\n }\\n\\n if (!@ldap_bind($this->connection, $this->searchUserName, $this->searchUserPassword)) {\\n throw new Yii2LdapAuthException(\\n 'Unable to bind LDAP search user. Code '\\n . ldap_errno($this->connection)\\n . '. Message: '\\n . ldap_error($this->connection)\\n );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79279636dac50f5bfd72c485acb8497d\",\n \"score\": \"0.56709087\",\n \"text\": \"public function auth_login()\\n\\t{\\n\\t\\t$this->copyAttribs = array();\\n\\t\\t$this->copyMethods = array();\\n\\t\\t$sql = e107::getDB('altAuth');\\n\\t\\t$sql->db_Select('alt_auth', '*', \\\"auth_type = 'ldap' \\\");\\n\\t\\twhile ($row = $sql->db_Fetch())\\n\\t\\t{\\n\\t\\t\\t$ldap[$row['auth_parmname']] = base64_decode(base64_decode($row['auth_parmval']));\\n\\t\\t\\tif ((strpos($row['auth_parmname'], 'ldap_xf_') === 0) && $ldap[$row['auth_parmname']]) // Attribute to copy on successful login\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->copyAttribs[substr($row['auth_parmname'], strlen('ldap_xf_'))] = $ldap[$row['auth_parmname']]; // Key = LDAP attribute. Value = e107 field name\\n\\t\\t\\t}\\n\\t\\t\\telseif ((strpos($row['auth_parmname'], 'ldap_pm_') === 0) && $ldap[$row['auth_parmname']] && ($ldap[$row['auth_parmname']] != 'none')) // Method to use to copy parameter\\n\\t\\t\\t{\\t// Any fields with non-null 'copy' methods\\n\\t\\t\\t\\t$this->copyMethods[substr($row['auth_parmname'], strlen('ldap_pm_'))] = $ldap[$row['auth_parmname']]; // Key = e107 field name. Value = copy method\\n\\t\\t\\t}\\n\\t\\t\\tunset($row['auth_parmname']);\\n\\t\\t}\\n\\t\\t$this->server = explode(',', $ldap['ldap_server']);\\n\\t\\t$this->serverType = $ldap['ldap_servertype'];\\n\\t\\t$this->dn = $ldap['ldap_basedn'];\\n\\t\\t$this->ou = $ldap['ldap_ou'];\\n\\t\\t$this->usr = $ldap['ldap_user'];\\n\\t\\t$this->pwd = $ldap['ldap_passwd'];\\n\\t\\t$this->ldapVersion = $ldap['ldap_version'];\\n\\t\\t$this->filter = (isset($ldap['ldap_edirfilter']) ? $ldap['ldap_edirfilter'] : \\\"\\\");\\n\\n\\t\\tif (!function_exists('ldap_connect'))\\n\\t\\t{\\n\\t\\t\\treturn AUTH_NORESOURCE;\\n\\t\\t}\\n\\n\\t\\tif (!$this->connect())\\n\\t\\t{\\n\\t\\t\\treturn AUTH_NOCONNECT;\\n\\t\\t}\\n\\t\\t$this->Available = TRUE;\\n\\t\\treturn AUTH_SUCCESS;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74f547d8e28e88cf962c4b36dba5408f\",\n \"score\": \"0.5546924\",\n \"text\": \"public\\tfunction authenticate($username, $password){\\n\\t$ldap_server = \\\"pundc2.win.ansys.com\\\";\\n $ldap_port = '389';\\n $ldap_user = 'ansys\\\\\\\\'.$username;\\n $ds=ldap_connect($ldap_server, $ldap_port) or die(\\\"Could not connect to LDAP server.\\\");\\n //bind only if password is not empty\\n // and connection with LDAP server is established\\n if($ds && !empty($password)){\\n ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);\\n if(!ldap_bind($ds, $ldap_user, $password)){\\n $this->setError(ldap_error($ds));\\n // Can not bind to LDAP\\n // Try local authentication\\n if($this->authenticateLocal($username, $password)){\\n\\t\\t\\t\\t//echo $this->user_id;\\n //$this->user_id = $this->getUserIdFromUsername($username);\\n return true;\\n }\\n // at this point, local authentication has also failed\\n return false;\\n }\\n // set the user_id and return true\\n $this->user_id = $this->getUserIdFromUsername($username);\\n if(empty($this->user_id)){\\n $this->setError('Could not find your account in Leave Management System');\\n return false;\\n }\\n // sync local db with info from LDAP\\n //pass the LDAP connection object\\n $this->syncWithLDAP($username,$password);\\n //Unbind LDAP\\n ldap_unbind($ds);\\n return true;\\n }\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2354654085c6fbcf959184fd6a44ea2\",\n \"score\": \"0.55337363\",\n \"text\": \"protected function adminBind() {\\n\\t\\tif ($this->admin_user === NULL) {\\n\\t\\t\\t// No admin user.\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\tSimpleSAML_Logger::debug('Negotiate - authenticate(): Binding as system user ' . var_export($this->admin_user, TRUE));\\n\\n\\t\\tif(!$this->ldap->bind($this->admin_user, $this->admin_pw)){\\n\\t\\t\\t$msg = 'Unable to authenticate system user (LDAP_INVALID_CREDENTIALS) ' . var_export($this->admin_user, TRUE);\\n\\t\\t\\tSimpleSAML_Logger::error('Negotiate - authenticate(): ' . $msg);\\n\\t\\t\\tthrow new SimpleSAML_Error_AuthSource($msg);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e0b94870a249e78d63bb7a4efe80975\",\n \"score\": \"0.5525526\",\n \"text\": \"function LDAP_makeConnection($host, $baseDN, $pwd=\\\"\\\")\\n{\\n\\t$ds=ldap_connect($host);\\n\\n\\tldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3 );\\n\\n\\tif (!empty($pwd))\\n\\t\\t$r=ldap_bind($ds,\\\"cn=admin,$baseDN\\\", \\\"$pwd\\\");\\n\\telse\\n\\t\\t$r=ldap_bind($ds);\\n\\n\\tif ($r === FALSE)\\n\\t\\treturn($r);\\n\\n\\treturn($ds);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b1036c0e281bfcf1ad4a392b4ba7213\",\n \"score\": \"0.5522426\",\n \"text\": \"function HookPosixldapauthAllExternalauth($uname, $pword)\\n{\\n\\t$ldap_debug = true;\\n\\t\\n\\tinclude_once \\\"include/collections_functions.php\\\";\\n\\n\\tinclude_once \\\"plugins/posixldapauth/config/config.default.php\\\";\\n\\tif (file_exists(\\\"plugins/posixldapauth/config/config.php\\\"))\\n\\t{\\n \\tinclude_once(\\\"plugins/posixldapauth/config/config.php\\\");\\n\\t}\\n\\tinclude_once \\\"plugins/posixldapauth/hooks/ldap_class.php\\\";\\n\\tglobal $username;\\n\\tglobal $password;\\n\\tglobal $password_hash,$use_plugins_manager,$ldapauth;\\n\\t$debugMode = false;\\n \\n if ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Starting Debug\\\") ; } \\n \\n \\n\\tif ($use_plugins_manager==true)\\n\\t{\\n\\t\\t$ldapauth = get_plugin_config(\\\"posixldapauth\\\");\\n\\t\\t\\n\\n\\t\\tif ($ldapauth==null || $ldapauth['enable']==false) \\n\\t\\t{\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\tif (!isset($ldapauth['ldapgroupcontainer']))\\n\\t\\t{\\n\\t\\t\\t$ldapauth['ldapgroupcontainer'] = \\\"\\\";\\n\\t\\t}\\n\\t\\tif (!isset($ldapauth['ldapmemberfield']))\\n\\t\\t{\\n\\t\\t\\t$ldapauth['ldapmemberfield'] = \\\"\\\";\\t\\n\\t\\t}\\n\\t\\t\\tif (!isset($ldapauth['ldapmemberfieldtype']))\\n\\t\\t{\\n\\t\\t\\t$ldapauth['ldapmemberfieldtype'] = 0;\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Configuration\\\") ; }\\n\\t\\t\\n\\t\\tif ($ldap_debug) {\\n\\t\\t\\tforeach ( $ldapauth as $key => $value ) {\\n\\t\\t\\t\\tif ($key == \\\"groupmap\\\") {\\n\\t\\t\\t\\t\\tforeach ($ldapauth['groupmap'] as $ldapGrpName => $arrLdapGrp) {\\t\\n\\t\\t\\t\\t\\t\\tif ($arrLdapGrp['enabled'])\\t{\\n\\t\\t\\t\\t\\t\\t\\terror_log( $ldapGrpName . \\\" is enabled and mapped to \\\" . $arrLdapGrp['rsGroup']);\\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} else {\\n\\t\\t\\t\\t\\terror_log( $key . \\\" = \\\" . $value);\\t\\n\\t\\t\\t\\t} \\n \\t\\n\\t\\t\\t} \\t\\t\\n\\t\\t}\\n\\t}\\n\\t\\n\\tif ($uname != \\\"\\\" && $pword != \\\"\\\") \\n\\t{\\n\\t\\t// pass the config to the class\\n\\t\\t$ldapConf['host'] = $ldapauth['ldapserver'];\\n\\t\\t$ldapConf['basedn'] = $ldapauth['basedn'];\\n\\t\\t$ldapConf['addomain']\\t= $ldapauth['addomain'];\\n\\t\\t\\n\\t\\tif ($ldapauth['adusesingledomain']) {\\n\\t\\t\\t$singleDomain=true;\\n\\t\\t} else {\\n\\t\\t\\t$singleDomain=false;\\n\\t\\t}\\n\\t\\t\\n\\t\\t$objLdapAuth = new ldapAuth($ldapConf);\\t\\n\\t\\tif ($ldap_debug) { $objLdapAuth->ldap_debug = true; };\\n\\t\\t\\n\\t\\t// connect to the ldap\\n\\t\\tif ($objLdapAuth->connect())\\n\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t// see if we can bind with the username and password.\\n\\t\\t\\tif($objLdapAuth->auth($uname,$pword,$ldapauth['ldaptype'],$ldapauth['ldapusercontainer'],$singleDomain))\\n\\t\\t\\t{\\n\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" auth to ldap server is successful \\\") ; }\\n\\t\\t\\t\\n\\t\\t\\t\\t$auth = true;\\n\\t\\t\\t\\t// get the user info etc\\t\\n\\t\\t\\t\\t$userDetails = $objLdapAuth->getUserDetails($uname);\\n\\t\\t\\t\\t//print_r($userDetails);\\n\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" cn=\\\" . $userDetails[\\\"cn\\\"]) ; }\\n\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" dn=\\\" . $userDetails[\\\"dn\\\"]) ; }\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$user_cn = $userDetails[\\\"cn\\\"];\\n\\t\\t\\t\\t$user_dn = $userDetails[\\\"dn\\\"];\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t/* \\tNow we have the user details, we need to figure out if the user exists in the \\n\\t\\t\\t\\t\\tRS database allready, in which case we'll update the passsword, or if it's\\n\\t\\t\\t\\t\\ta new user and create users is set, then we create a new user.\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tMaybe w should also check groups as well? So if group membership has changed the user will be updated!\\n\\t\\t\\t\\t*/\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$uexists=sql_query('select ref from user where username=\\\"'.$uname.$ldapauth['usersuffix'].'\\\"');\\n\\t\\t\\t\\tif (count($uexists)>=1) \\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" User has allready been added to RS, updating password\\\") ; }\\n\\t\\t\\t\\t\\t// if we get here, the user has already been added to RS.\\n\\t\\t\\t\\t\\t$username=$uname.$ldapauth['usersuffix'];\\n\\t\\t\\t\\t\\t$password_hash= md5(\\\"RS\\\".$username.$password);\\n\\t\\t\\t\\t\\tsql_query('update user set password=\\\"'.$password_hash.'\\\" where username=\\\"'.$username.'\\\"');\\n\\t\\t\\t\\t\\t// $password=sql_value('select password value from user where username=\\\"'.$uname.$ldapauth['usersuffix'].'\\\"',\\\"\\\");\\n\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telseif ($ldapauth['createusers']) \\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Create Users is Enabled\\\") ; }\\n\\t\\t\\t\\t\\t// else, is we have specified to create users from the LDAP, we need to get info about the user\\n\\t\\t\\t\\t\\t// to add them to resource space.\\n\\t\\t\\t\\t\\t$nuser = array();\\n\\t\\t\\t\\t\\t// Start Populating User Fields from LDAP\\n\\t\\t\\t\\t\\t$nuser['username']=$uname.$ldapauth['usersuffix'];\\n\\t\\t\\t\\t\\t$nuser['fullname']=$user_cn;\\n\\t\\t\\t\\t\\tif (isset($userDetails[\\\"mail\\\"]))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$nuser['email']=$userDetails[\\\"mail\\\"];\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t$nuser['email']=\\\"$uname@mail\\\";\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$nuser['password']=md5(\\\"RS\\\". $nuser['username'].$password);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t// Set a var so that we can keep track of the group level as we scan the access groups.\\n\\t\\t\\t\\t\\t$currentGroupLevel = 0;\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif ($ldapauth['groupbased'])\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Group Based is Enabled, checking Groups\\\") ; }\\n\\t\\t\\t\\t\\t\\t// set match to false as default\\\"\\n\\t\\t\\t\\t\\t\\t$match = false;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t/* \\tAt this point we want to do a switch on the type of directory we are authenticing against\\n\\t\\t\\t\\t\\t\\t\\tso that we can use group matching for the different types of directory layout:\\n\\t\\t\\t\\t\\t\\t\\tie, AD uses memberof, OD doesn't!\\n\\t\\t\\t\\t\\t\\t\\tWe also need to check for higher numbered groups, ie if a user is amember of staff, and of admin users,\\n\\t\\t\\t\\t\\t\\t\\twe need to give them the highest access!\\n\\t\\t\\t\\t\\t\\t*/\\n\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Group Based is Enabled, checking Groups\\\") ; }\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t// set the uid, ie the username...\\n\\t\\t\\t\\t\\t\\t$objLdapAuth->userName = $uname;\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t// now we cycle through the config array to check groups!\\n\\t\\t\\t\\t\\t\\tforeach ($ldapauth['groupmap'] as $ldapGrpName => $arrLdapGrp)\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t// check to see if we are allowing users in this group to log in?\\n\\t\\t\\t\\t\\t\\t\\tif ($arrLdapGrp['enabled'])\\n\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Checking Group \\\" . $ldapGrpName) ; }\\n\\t\\t\\t\\t\\t\\t\\t\\t// get the group name and check group membership\\t\\n\\t\\t\\t\\t\\t\\t\\t\\tif ($objLdapAuth->checkGroupByName($ldapGrpName,$ldapauth['ldaptype'],$ldapauth['ldapgroupcontainer'],$ldapauth['ldapmemberfield'],$ldapauth['ldapmemberfieldtype']))\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( $match )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($currentGroupLevel < $arrLdapGrp['rsGroup'])\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$nuser['usergroup'] = $arrLdapGrp['rsGroup'];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$currentGroupLevel = $arrLdapGrp['rsGroup'];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$match = true;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$nuser['usergroup'] = $arrLdapGrp['rsGroup'];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$currentGroupLevel = $arrLdapGrp['rsGroup'];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} \\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Match found in group \\\" . $ldapGrpName) ; }\\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\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t// if we haven't managed to find a group match that is allowed to log into RS, then\\n\\t\\t\\t\\t\\t\\t// we return false!\\t- we ned to modify this to use the group set if group based is not enabled!\\n\\t\\t\\t\\t\\t\\tif (!($match)) return false;\\n\\t\\t\\t\\t\\t\\t// Create the user\\n\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __METHOD__ . \\\" \\\" . __LINE__ . \\\" Creating User: \\\" . $nuser['username']) ; }\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$ref=new_user($nuser['username']);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __METHOD__ . \\\" \\\" . __LINE__ . \\\" User Ref: \\\" . $ref) ; }\\n\\t\\t\\t\\t\\t\\tif (!$ref) \\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\tif ($ldap_debug) { \\n\\t\\t\\t\\t\\t\\t\\t\\terror_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" Group based User creation ref NOT RETURNED, SOMETHING WEIRD HAPPENED!\\\"); \\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\treturn false; # Shouldn't ever get here. Something strange happened\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t// Update with information from LDAP\\n\\t\\t\\t\\t\\t\\tsql_query('update user set password=\\\"'.$nuser['password'].\\n\\t\\t\\t\\t\\t\\t\\t'\\\", fullname=\\\"'.$nuser['fullname'].'\\\", email=\\\"'.$nuser['email'].'\\\", usergroup=\\\"'.\\n\\t\\t\\t\\t\\t\\t\\t$nuser['usergroup'].'\\\", comments=\\\"Auto create from LDAP\\\" where ref=\\\"'.$ref.'\\\"');\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$username=$nuser['username'];\\n\\t\\t\\t\\t\\t\\t$password=$nuser['password'];\\n\\n\\n\\t\\t\\t\\t\\t\\t// now unbind\\n\\t\\t\\t\\t\\t\\t$objLdapAuth->unBind();\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tif ($ldap_debug) { error_log( __METHOD__ . \\\" \\\" . __LINE__ . \\\" returning true : successful user creation!\\\") ; }\\n\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\telse {\\n\\t\\t\\t\\t\\t\\t// non group based user creation.\\n\\t $ref=new_user($nuser['username']);\\n\\t \\tif (!$ref) \\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\tif ($ldap_debug) { \\n\\t\\t\\t\\t\\t\\t\\t\\terror_log( __FILE__ . \\\" \\\" . __METHOD__ . \\\" \\\" . __LINE__ . \\\" NON Group based User creation ref NOT RETURNED, SOMETHING WEIRD HAPPENED!\\\"); \\n\\t\\t\\t\\t\\t\\t\\t} \\n\\t\\t\\t\\t\\t\\t\\treturn false; # Shouldn't ever get here. Something strange happened\\n\\t\\t\\t\\t\\t\\t}\\n\\t // Update with information from LDAP\\n\\t sql_query('update user set password=\\\"'.$nuser['password'].\\n\\t '\\\", fullname=\\\"'.$nuser['fullname'].'\\\", email=\\\"'.$nuser['email'].'\\\", usergroup=\\\"'.\\n\\t $ldapauth['newusergroup'].'\\\", comments=\\\"Auto create from LDAP\\\" where ref=\\\"'.$ref.'\\\"');\\n\\t\\n\\t $username=$nuser['username'];\\n\\t $password=$nuser['password'];\\n\\t\\t\\t\\t}\\t\\t\\t\\n\\t\\t\\t} else {\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t// username / password is wrong!\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\t\\t\\n\\t\\t}\\t\\n\\t\\treturn false;\\t\\t\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24840ef173ac2be39369a975ad99229b\",\n \"score\": \"0.5486628\",\n \"text\": \"public function authenticate() {\\n\\n $this->filter = \\\"(|(uid=$this->username*))\\\";\\n\\n try {\\n $ldap_query = ldap_search($this->ldap_connexion, $this->config['ldap_base_rdn'], $this->filter)\\n or exit(\\\">>Could not connect to LDAP server<<\\\");\\n } catch (\\\\Exception $e) {\\n echo $e->getMessage();\\n }\\n\\n $ldap_get_entries = ldap_get_entries($this->ldap_connexion, $ldap_query);\\n\\n $ldap_first_entry = ldap_first_entry($this->ldap_connexion, $ldap_query);\\n $ldap_entries = ldap_get_entries($this->ldap_connexion, $ldap_query);\\n //var_dump($ldap_entries[0]['mail'][0]);\\n \\n if ('resource' === gettype($ldap_first_entry)) {\\n $this->user_dn = ldap_get_dn($this->ldap_connexion, $ldap_first_entry);\\n $this->user_ldap_connt_status = @ldap_bind($this->ldap_connexion, $this->user_dn, $this->password);\\n }\\n\\n if ($this->user_ldap_connt_status === TRUE) {\\n /* * Cas de non soumission d'un utilisateur AUI** */\\n $user = $this->userManager->getUserExistsByFullNameWithStatus($this->username, User::STATUS_ACTIVE);\\n if ($user != null) // Récuperer le user\\n return new LdapResult(LdapResult::SUCCESS, $this->username, ['Authenticated successfully'], $ldap_entries);\\n else { // Considérer le user comme un visiteur \\n $user = $this->userManager->getUserExistsByFullNameWithStatus($this->username, User::STATUS_DRAFT);\\n if ($user != null)\\n return new LdapResult(LdapResult::FAILURE_UNCATEGORIZED, $this->username, ['Authenticated successfully'], $ldap_entries);\\n else\\n return new LdapResult(LdapResult::FAILURE_IDENTITY_NOT_FOUND, $this->username, ['Authenticated successfully'], $ldap_entries);\\n }\\n } else\\n return new LdapResult(LdapResult::FAILURE, null, ['Authenticated failure'], $ldap_entries);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0672b248e7a23cbf914a649213f1b7d\",\n \"score\": \"0.5470609\",\n \"text\": \"public function getLdapEnabled()\\n {\\n return $this->ldap_enabled;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87be5b8794bcadc8676acbbf11f86cb7\",\n \"score\": \"0.5464138\",\n \"text\": \"public function debugLDAPConnection() {\\n\\t\\t$opts = array(\\n\\t\\t\\t'LDAP_OPT_DEREF',\\n\\t\\t\\t'LDAP_OPT_SIZELIMIT',\\n\\t\\t\\t'LDAP_OPT_TIMELIMIT',\\n\\t\\t\\t'LDAP_OPT_NETWORK_TIMEOUT',\\n\\t\\t\\t'LDAP_OPT_PROTOCOL_VERSION',\\n\\t\\t\\t'LDAP_OPT_ERROR_NUMBER',\\n\\t\\t\\t'LDAP_OPT_REFERRALS',\\n\\t\\t\\t'LDAP_OPT_RESTART',\\n\\t\\t\\t'LDAP_OPT_HOST_NAME',\\n\\t\\t\\t'LDAP_OPT_ERROR_STRING',\\n\\t\\t\\t'LDAP_OPT_MATCHED_DN',\\n\\t\\t\\t'LDAP_OPT_SERVER_CONTROLS',\\n\\t\\t\\t'LDAP_OPT_CLIENT_CONTROLS'\\n\\t\\t);\\n\\t\\tforeach ($opts as $opt) {\\n\\t\\t\\t$ve = '';\\n\\t\\t\\t$this->_call('get_option', $this->_connection, constant($opt), $ve);\\n\\t\\t\\t$this->log(\\\"Option={$opt}, Value=\\\" . print_r($ve, true),'debug');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97a89055df838265fc350b3ee62abb7f\",\n \"score\": \"0.5459936\",\n \"text\": \"function createObject($ldap_conn, $distinguishedName, $properties)\\n{\\n bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS);\\n\\n ldap_add($ldap_conn, $distinguishedName, $properties);\\n\\n if (ldap_error($ldap_conn) == \\\"Success\\\") {\\n\\n return true;\\n } else {\\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13602c699e752442d6719bbf66852932\",\n \"score\": \"0.5435183\",\n \"text\": \"protected function _bindLdapAdminUser()\\n {\\n $connect = $this->_getLinkId();\\n if (!$connect) {\\n jLog::log('multiauth ldap: impossible to connect to ldap', 'auth');\\n return false;\\n }\\n\\n if ($this->_params['adminUserDn'] == '') {\\n $bind = @ldap_bind($connect);\\n } else {\\n $bind = @ldap_bind($connect, $this->_params['adminUserDn'], $this->_params['adminPassword']);\\n }\\n if (!$bind) {\\n $this->logLdapError($connect, 'admin bind failed');\\n if ($this->_params['adminUserDn'] == '') {\\n jLog::log('multiauth ldap: impossible to authenticate to ldap as anonymous admin user', 'auth');\\n } else {\\n jLog::log('multiauth ldap: impossible to authenticate to ldap with admin user '.$this->_params['adminUserDn'], 'auth');\\n }\\n ldap_close($connect);\\n return false;\\n }\\n return $connect;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47f4cb00730e6718bf5f98a2dbb4d6fc\",\n \"score\": \"0.54162806\",\n \"text\": \"function __construct($username, $password, $params=array()){\\n if(empty($username) ||\\n empty($password) || //here I always expect a password. Is this ok?\\n !isset($params['host']) ||\\n empty($params['host'])){\\n /**\\n * @see Zend_Auth_Adapter_Exception\\n */\\n require_once 'Zend/Auth/Adapter/Exception.php';\\n throw new Zend_Auth_Adapter_Exception(\\n 'Username, Password and Host must be set before calling '\\n . 'authenticate()');\\n }\\n\\n //test if the ldap module is loaded\\n if(!extension_loaded('ldap')){\\n require_once 'Zend/Auth/Adapter/Exception.php';\\n throw new Zend_Auth_Adapter_Exception(\\n 'Authenticate() : Ldap extension is not properly loaded');\\n\\n }\\n\\n $this->_messages=array();\\n\\n $this->_params = $this->_setDefaultParams();\\n $this->_params['username'] = $username;\\n $this->_params['posted_username'] = $this->_params['username'];\\n $this->_params['password'] = $password;\\n\\n\\n //apply the provided params\\n foreach ($params as $key => $value) {\\n $this->_params[$key] = $value;\\n }\\n\\n\\n //set the variables depending on the params array\\n if(isset($this->_params['use_domain_from_email']) && $this->_params['use_domain_from_email']){\\n //the ensure the user has posted an email\\n $at_pos = strpos($this->_params['posted_username'], '@');\\n if(!$at_pos){\\n $this->_messages[]=__CLASS__ . ' use_domain_from_email option is enabled, '.\\n ' but user did not provide an email ';\\n }\\n else{\\n //parse the email to get the domain\\n $this->_params['username'] = substr($this->_params['posted_username'], 0, $at_pos);\\n $this->_params['domain'] = substr($this->_params['posted_username'], $at_pos+1);\\n }\\n }\\n //NT domain needs to be prepended to the username\\n if(isset($this->_params['domain']) && !empty($this->_params['domain'])){\\n $this->_params['username'] = $this->_params['domain'].\\\"\\\\\\\\\\\".$this->_params['username'];\\n }\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b04756b4027671bedb22b5f37d0d3db\",\n \"score\": \"0.5414287\",\n \"text\": \"protected function _bindLdapAdminUser()\\n {\\n $connect = $this->_getLinkId();\\n if (!$connect) {\\n jLog::log('authloginpass ldap: impossible to connect to ldap', 'auth');\\n return false;\\n }\\n\\n if ($this->_params['adminUserDn'] == '') {\\n $bind = @ldap_bind($connect);\\n } else {\\n $bind = @ldap_bind($connect, $this->_params['adminUserDn'], $this->_params['adminPassword']);\\n }\\n if (!$bind) {\\n if ($this->_params['adminUserDn'] == '') {\\n jLog::log('authloginpass ldap: impossible to authenticate to ldap as anonymous admin user', 'auth');\\n } else {\\n jLog::log('authloginpass ldap: impossible to authenticate to ldap with admin user '.$this->_params['adminUserDn'], 'auth');\\n }\\n ldap_close($connect);\\n return false;\\n }\\n return $connect;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5dec26df2e47a17e138f31b93b41524\",\n \"score\": \"0.5406222\",\n \"text\": \"protected function _getLinkId()\\n {\\n if ($connect = @ldap_connect($this->uriConnect)) {\\n //ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);\\n ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, $this->_params['protocolVersion']);\\n ldap_set_option($connect, LDAP_OPT_REFERRALS, 0);\\n\\n if ($this->_params['tlsMode'] == 'starttls') {\\n if (!@ldap_start_tls($connect)) {\\n $this->logLdapError($connect, 'connection error: impossible to start TLS connection to '.$this->uriConnect);\\n return false;\\n }\\n }\\n return $connect;\\n }\\n jLog::log('authloginpass: ldap error, bad syntax in the given uri \\\"'.$this->uriConnect.'\\\"', 'auth');\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc91dd4cea26e1586e7b285232b855d0\",\n \"score\": \"0.5390242\",\n \"text\": \"function LDAP_installServer($host,$org,$domain,$pwd,$runInScreen=true,$disablePackageInstallation=false)\\n{\\nif (!$disablePackageInstallation)\\n\\t$installCmd=\\\"apt-get update\\n\\t\\tapt-get -y --force-yes install slapd php4-ldap ldap-utils\\\";\\n\\telse\\n\\t$installCmd=\\\"dpkg-reconfigure slapd\\\";\\n\\n$cmd=\\\"\\nrm /tmp/ldapConfig\\n\\ncat >> /tmp/ldapConfig << \\\\\\\"LDAPEOF\\\\\\\"\\nslapd slapd/password1 password $pwd\\nslapd slapd/internal/adminpw password \\nslapd slapd/password2 password $pwd\\nslapd slapd/fix_directory boolean true\\nslapd shared/organization string $org\\nslapd slapd/backend select BDB\\nslapd slapd/allow_ldap_v2 boolean false\\nslapd slapd/no_configuration boolean false\\nslapd slapd/move_old_database boolean true\\nslapd slapd/suffix_change boolean false\\nslapd slapd/dump_database_destdir string /var/backups/slapd-VERSION\\nslapd slapd/autoconf_modules boolean true\\nslapd slapd/domain string $domain\\nslapd slapd/invalid_config boolean true\\nslapd slapd/dump_database select when needed\\nslapd slapd/migrate_ldbm_to_bdb boolean true\\nslapd slapd/purge_database boolean false\\nLDAPEOF\\n\\ndebconf-set-selections /tmp/ldapConfig\\n\\n/etc/init.d/slapd stop\\n\\nkillall -9 slapd\\n\\nexport DEBIAN_FRONTEND=noninteractive\\n\\n$installCmd\\n\\nif test `grep -l \\\\\\\"^extension=ldap.so\\\\\\\" /etc/php4/apache/php.ini`\\nthen\\n echo \\\\\\\"LDAP is activated in php.ini\\\\\\\"\\nelse\\n echo \\\\\\\"Activating LDAP in php.ini\\\\\\\"\\n echo \\\\\\\"extension=ldap.so\\\\\\\" >> /etc/php4/apache/php.ini\\nfi\\n\\\".\\n\\tEDIT_searchLineNumber(\\\"/etc/ldap/slapd.conf\\\",\\\"/etc/ldap/schema/inetorgperson.schema\\\").\\n\\tEDIT_calc(SED_foundLine,\\\"+ 1\\\").\\n\\tEDIT_insertAfterLineNumber(\\\"/etc/ldap/slapd.conf\\\", SED_foundLine, \\\"include /etc/ldap/schema/misc.schema\\\\ninclude /etc/ldap/schema/openldap.schema\\\",true)\\n.\\\"\\n\\nkillall -9 slapd\\n\\n/etc/init.d/slapd start\\n/etc/init.d/slapd restart\\n\\nrm /tmp/ldap.ldif 2> /dev/null\\n\\ncat >> /tmp/ldap.ldif << \\\\\\\"LDIFEOF\\\\\\\"\\nversion: 1\\n\\n# Entry 1: ou=people,dc=$domain\\ndn: ou=people,dc=$domain\\nobjectClass: organizationalUnit\\nou: people\\nLDIFEOF\\n\\nsleep 5\\n\\nldapadd -x -D \\\\\\\"cn=admin,dc=$domain\\\\\\\" -w $pwd -f /tmp/ldap.ldif\\n\\n/etc/init.d/apache restart\\n\\\";\\n\\nLDAP_addServerTophpLdapAdmin(\\\"m23 LDAP server\\\",$host,\\\"dc=$domain\\\",$pwd);\\n\\nif ($runInScreen)\\n\\tSERVER_runInBackground(\\\"installLDAP\\\",$cmd);\\nelse\\n\\tsystem($cmd);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af5e2ed5ef53f156ad7ee0d82e52a577\",\n \"score\": \"0.5355492\",\n \"text\": \"public function __construct(AdldapInterface $ldap)\\n {\\n $this->ldap = $ldap;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff2576b6fe1550d8b98d7e21737cec58\",\n \"score\": \"0.5345618\",\n \"text\": \"function ldap_get_dn($link_identifier, $result_entry_identifier)\\n{\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"837baee8746ab3ce89be93347b287e03\",\n \"score\": \"0.5310695\",\n \"text\": \"public function connect()\\n\\t{\\n\\t\\tforeach ($this->server as $key => $host)\\n\\t\\t{\\n\\t\\t\\t$this->connection = ldap_connect($host);\\n\\t\\t\\tif ($this->connection)\\n\\t\\t\\t{\\n\\t\\t\\t\\tif ($this->ldapVersion == 3 || $this->serverType == \\\"ActiveDirectory\\\")\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t@ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, 3);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$this->ldapErrorCode = -1;\\n\\t\\t$this->ldapErrorText = \\\"Unable to connect to any server\\\";\\n\\t\\t$this->ErrorText = $this->ldapErrorCode . ': ' . $this->ldapErrorText;\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dbf369d2e2ecea9f3e1f94339007a90\",\n \"score\": \"0.5307712\",\n \"text\": \"function setup () {\\r\\n try {\\r\\n\\r\\n // we're trying to use a adLDAP object\\r\\n $this->driver = new \\\\adLDAP ( array (\\r\\n 'base_dn' => $this->config->base_dn,\\r\\n 'account_suffix' => $this->config->account_suffix,\\r\\n 'domain_controllers' => $this->config->domain_controllers\\r\\n ), $this->glob->logger ) ;\\r\\n\\r\\n $this->driver->set_ad_username ( $this->config['username'] ) ;\\r\\n $this->driver->set_ad_password ( $this->config['password'] ) ;\\r\\n\\r\\n $this->driver->connect () ;\\r\\n \\r\\n // var_dump ( $this->driver ) ;\\r\\n\\r\\n return true ;\\r\\n\\r\\n } catch (Exception $exc) {\\r\\n // Ouch!\\r\\n // echo '
'.$exc->getTraceAsString().'
' ;\\r\\n\\r\\n $this->alert ( 'error', 'Cannot connect to LDAP server', 'It seems we cannot connect to the LDAP server ('.str_replace(array('[',']',\\\"\\\\n\\\",\\\"\\\\r\\\"),'', print_r($this->config->domain_controllers,true)).')' ) ;\\r\\n return null ;\\r\\n }\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc0af247a86cce1b59d96c5e417d2be2\",\n \"score\": \"0.5305755\",\n \"text\": \"function LDAP($binddn = '', $bindpw = '', $hostname = '', $basedn = '', $configFile = '', $protocol = '') {\\n\\t\\t$this->hostname = $hostname;\\n\\t\\t$this->basedn = $basedn;\\n\\t\\t$this->binddn = $binddn;\\n\\t\\t$this->bindpw = $bindpw;\\n\\t\\t$this->OCconfigFilePath = $configFile;\\n\\t\\t$this->protocol = $protocol;\\n\\t\\t\\n\\t\\tif ($binddn == '') {\\n\\t\\t\\t$binddn = $this->binddn;\\n\\t\\t}\\n\\t\\tif ($bindpw == '') {\\n\\t\\t\\t$bindpw = $this->bindpw;\\n\\t\\t}\\n\\t\\tif ($hostname == '') {\\n\\t\\t\\t$hostname = $this->hostname;\\n\\t\\t}\\n\\t\\tif ($protocol == '') {\\n\\t\\t\\t$protocol = $this->protocol;\\n\\t\\t}\\n\\t\\t$this->connect($binddn, $bindpw, $hostname);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c23a2d451b924e40a055a7ba296eeb9\",\n \"score\": \"0.5304275\",\n \"text\": \"function importLdapUser() {\\r\\n $oSgbdDataAccess = new PgsqlDataAccess($this->oConnection->oBd, $this->aProperties[\\\"database\\\"], $this->aProperties[\\\"server\\\"], \\\"vitis_user\\\", \\\"vitis_admin\\\", $this->aProperties[\\\"schema_framework\\\"]);\\r\\n $this->aValues[\\\"login\\\"] = mb_strtolower($this->aValues[\\\"login\\\"], 'UTF-8');\\r\\n $this->aValues[\\\"login\\\"] = str_replace(array('à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ'), array('a', 'a', 'a', 'a', 'a', 'a', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'e', 'e', 'e', 'e', 'c', 'y', 'n',), $this->aValues[\\\"login\\\"]);\\r\\n $sErrorMessage = $oSgbdDataAccess->createSgbdUserNoPassword($this->aValues[\\\"login\\\"]);\\r\\n if ($sErrorMessage != \\\"\\\") {\\r\\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\\r\\n $aXmlRacineAttribute['status'] = 0;\\r\\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\\r\\n } else {\\r\\n require $this->sRessourcesFile;\\r\\n $aParams = array();\\r\\n $aParams['sLdapName'] = array('value' => 'vitis_' . $this->aValues['ldap_name'], 'type' => 'double_quote');\\r\\n $aParams['sLogin'] = array('value' => $this->aValues['login'], 'type' => 'double_quote');\\r\\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['grantUser'], $aParams);\\r\\n if ($this->oConnection->oBd->enErreur()) {\\r\\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\\r\\n $aXmlRacineAttribute['status'] = 0;\\r\\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\\r\\n } else {\\r\\n $aParams = array();\\r\\n $aParams['sSchemaName'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');\\r\\n $aParams['sName'] = array('value' => 'user', 'type' => 'column_name');\\r\\n $aParams['sLogin'] = array('value' => $this->aValues['login'], 'type' => 'string');\\r\\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getLogin'], $aParams);\\r\\n $oResult = $this->oConnection->oBd->objetSuivant($oPDOresult);\\r\\n if ($this->oConnection->oBd->enErreur()) {\\r\\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\\r\\n $aXmlRacineAttribute['status'] = 0;\\r\\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\\r\\n } else {\\r\\n // Création ou maj de l'utilisateur\\r\\n if ($oResult) {\\r\\n $this->oConnection->oBd->update($this->aProperties[\\\"schema_framework\\\"], 'user', $this->aValues, \\\"user_id\\\", $oResult->user_id);\\r\\n $this->aFields['user_id'] = $oResult->user_id;\\r\\n } else {\\r\\n $iId = $this->oConnection->oBd->insert($this->aProperties[\\\"schema_framework\\\"], 'user', $this->aValues, $this->aProperties['schema_framework'] . '.seq_common', 'user_id');\\r\\n $this->aFields['user_id'] = $iId;\\r\\n }\\r\\n //\\r\\n if ($this->oConnection->oBd->enErreur()) {\\r\\n $oError = new VitisError(1, $this->oConnection->oBd->getBDMessage());\\r\\n $aXmlRacineAttribute['status'] = 0;\\r\\n $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\\r\\n } else {\\r\\n $aXmlRacineAttribute['status'] = 1;\\r\\n $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return $sMessage;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c6a29600880c9b03fee032788e55914\",\n \"score\": \"0.5269214\",\n \"text\": \"function getGroupDNsFromSAM($ldap_conn, $baseOU, $groupList)\\n{\\n\\n //needed in case user searches from the root of the domain\\n ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0);\\n ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);\\n $groupDNList = array();\\n //grab only the DN\\n $attributes = array(\\\"dn\\\");\\n\\n if (bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS)) {\\n foreach ($groupList as $group) {\\n $filter = \\\"(&(objectCategory=Group)(sAMAccountName=\\\" . $group . \\\"))\\\";\\n $result = ldap_search($ldap_conn, $baseOU, $filter, $attributes);\\n $entries = ldap_get_entries($ldap_conn, $result);\\n\\n if ($entries['count'] > 0) {\\n array_push($groupDNList, $entries[0]['dn']);\\n }\\n }\\n }\\n\\n return $groupDNList;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62619e686b098238651d87d6528e7ad1\",\n \"score\": \"0.5265063\",\n \"text\": \"function LDAP_checkphpLdapAdminConfiguration()\\n{\\nif (file_exists(\\\"/m23/data+scripts/m23admin/phpldapadmin/config.php\\\"))\\n\\treturn;\\n\\n$file=fopen(\\\"/m23/data+scripts/m23admin/phpldapadmin/config.php\\\",\\\"w\\\");\\nfwrite($file,\\\"\\n\\n\\\");\\nfclose($file);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"561b6d94597b74ce0a11d21fc1859cba\",\n \"score\": \"0.52431506\",\n \"text\": \"function LDAP_addServerTophpLdapAdmin($name,$host,$base,$pwd,$port=389)\\n{\\n$confFile=\\\"/m23/data+scripts/m23admin/phpldapadmin/config.php\\\";\\nLDAP_checkphpLdapAdminConfiguration();\\n\\n$cmd=\\nEDIT_searchLastLineNumber($confFile,\\\"'unique_attrs_dn_pass']\\\").\\nEDIT_insertAfterLineNumber($confFile, SED_foundLine, \\\"\\n\\\\$i++;\\n\\\\$servers[\\\\$i]['name'] = '$name';\\n\\\\$servers[\\\\$i]['host'] = '$host';\\n\\\\$servers[\\\\$i]['base'] = '$base';\\n\\\\$servers[\\\\$i]['port'] = $port;\\n\\\\$servers[\\\\$i]['auth_type'] = 'config';\\n\\\\$servers[\\\\$i]['login_dn'] = 'cn=admin,$base';\\n\\\\$servers[\\\\$i]['login_pass'] = '$pwd';\\n\\\\$servers[\\\\$i]['tls'] = false;\\n\\\\$servers[\\\\$i]['low_bandwidth'] = false;\\n\\\\$servers[\\\\$i]['default_hash'] = 'crypt';\\n\\\\$servers[\\\\$i]['login_attr'] = 'dn';\\n\\\\$servers[\\\\$i]['login_class'] = '';\\n\\\\$servers[\\\\$i]['read_only'] = false;\\n\\\\$servers[\\\\$i]['show_create'] = true;\\n\\\\$servers[\\\\$i]['enable_auto_uid_numbers'] = false;\\n\\\\$servers[\\\\$i]['auto_uid_number_mechanism'] = 'search';\\n\\\\$servers[\\\\$i]['auto_uid_number_search_base'] = 'ou=People,dc=example,dc=com';\\n\\\\$servers[\\\\$i]['auto_uid_number_min'] = 1000;\\n\\\\$servers[\\\\$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';\\n\\\\$servers[\\\\$i]['unique_attrs_dn'] = '';\\n\\\\$servers[\\\\$i]['unique_attrs_dn_pass'] = '';\\n\\\");\\n\\nsystem($cmd);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a68a90140479347d21ce73982c1376e8\",\n \"score\": \"0.5240616\",\n \"text\": \"public function connect($bindDN = null, $bindPasswd = null) {\\n\\t\\t//$config = array_merge($this->_baseConfig, $this->config); // TODO REMOVE\\n\\t\\t$config \\t\\t= $this->config;\\n\\t\\t$hasFailover\\t= false;\\n\\t\\tif (isset($config['host']) && is_array($config['host'])) {\\n\\t\\t\\t$config['host'] = $config['host'][$this->_multiMasterUse];\\n\\t\\t\\tif (count($this->config['host']) > (1 + $this->_multiMasterUse)) {\\n\\t\\t\\t\\t$hasFailOver = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$bindDN = (empty($bindDN)) ? $config['login'] : $bindDN;\\n\\t\\t$bindPasswd = (empty($bindPasswd)) ? $config['password'] : $bindPasswd;\\n\\t\\t$this->_connection = $this->_call('connect', $config['host']);\\n\\t\\tif (!$this->_connection) {\\n\\t\\t\\t//Try Next Server Listed\\n\\t\\t\\tif ($hasFailover) {\\n\\t\\t\\t\\t$this->log('Trying Next LDAP Server in list:' . $this->config['host'][$this->_multiMasterUse], 'ldap.error');\\n\\t\\t\\t\\t$this->_multiMasterUse++;\\n\\t\\t\\t\\t$this->connect($bindDN, $bindPasswd);\\n\\t\\t\\t\\tif ($this->connected) {\\n\\t\\t\\t\\t\\treturn $this->connected;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t//Set our protocol version usually version 3\\n\\t\\t$this->_call('set_option', $this->_connection, LDAP_OPT_PROTOCOL_VERSION, $config['version']);\\n\\n\\t\\tif ($config['tls']) {\\n\\t\\t\\tif (!$this->_call('start_tls', $this->_connection)) {\\n\\t\\t\\t\\t$this->log('Ldap_start_tls failed', 'ldap.error');\\n\\t\\t\\t\\tthrow new Exception('Ldap_start_tls failed');\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t// So little known fact, if your php-ldap lib is built against openldap like pretty much every linux\\n\\t\\t// distro out there like Redhat, SUSE etc. The connect doesn't actually happen when you call ldap_connect\\n\\t\\t// it happens when you call ldap_bind. So if you are using failover then you have to test here also.\\n\\t\\t$bindResult = $this->_call('bind', $this->_connection, $bindDN, $bindPasswd);\\n\\t\\tif (!$bindResult) {\\n\\t\\t\\tif ($this->_call('errno', $this->_connection) == 49) {\\n\\t\\t\\t\\t$this->log(\\\"Auth failed for '$bindDN'!\\\", 'ldap.error');\\n\\t\\t\\t} elseif ($hasFailover) {\\n\\t\\t\\t\\t$this->log('Trying Next LDAP Server in list:' . $this->config['host'][$this->_multiMasterUse], 'ldap.error');\\n\\t\\t\\t\\t$this->_multiMasterUse++;\\n\\t\\t\\t\\t$this->connect($bindDN, $bindPasswd);\\n\\t\\t\\t\\tif ($this->connected) {\\n\\t\\t\\t\\t\\treturn $this->connected; // TODO isn't this superfluous?\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\t$this->connected = true;\\n\\t\\t}\\n\\t\\treturn $this->connected;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c6ff9e20a7677071bc468248c848fd4\",\n \"score\": \"0.5236599\",\n \"text\": \"function _cerrarLdap()\\n {\\n ldap_close($this->conexion);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3945fa8f1ebaa8d7f358b215bd0cefcd\",\n \"score\": \"0.5231236\",\n \"text\": \"function &getAuthConnection($uname)\\r\\n\\t{\\r\\n\\t\\tstatic $auth_instance;\\t\\t\\r\\n\\t\\tif (!isset($auth_instance)) {\\r\\n\\t\\t\\t$config_handler =& xoops_gethandler('config'); \\r\\n \\t\\t$authConfig = $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); \\t\\t\\r\\n\\t\\t\\trequire_once XOOPS_ROOT_PATH.'/class/auth/auth.php';\\r\\n\\t\\t\\tif (empty($authConfig['auth_method'])) { // If there is a config error, we use xoops\\r\\n\\t\\t\\t\\t$xoops_auth_method = 'xoops';\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t $xoops_auth_method = $authConfig['auth_method'];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t// Verify if uname allow to bypass LDAP auth \\r\\n\\t\\t\\tif (in_array($uname, $authConfig['ldap_users_bypass'])) $xoops_auth_method = 'xoops';\\r\\n\\t\\t\\t$file = XOOPS_ROOT_PATH . '/class/auth/auth_' . $xoops_auth_method . '.php';\\t\\t\\t\\r\\n\\t\\t\\trequire_once $file;\\r\\n\\t\\t\\t$class = 'XoopsAuth' . ucfirst($xoops_auth_method);\\r\\n\\t\\t\\tswitch ($xoops_auth_method) {\\r\\n\\t\\t\\t\\tcase 'xoops' :\\r\\n\\t\\t\\t\\t\\t$dao =& $GLOBALS['xoopsDB'];\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 'ldap' : \\r\\n\\t\\t\\t\\t\\t$dao = null;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 'ads' : \\r\\n\\t\\t\\t\\t\\t$dao = null;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$auth_instance = new $class($dao);\\r\\n\\t\\t}\\r\\n\\t\\treturn $auth_instance;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08476024c5a8503c9954dd144ac778a0\",\n \"score\": \"0.5219174\",\n \"text\": \"function ldap_authenticate( $p_login_name, $p_password ) \\r\\n{\\r\\n # if password is empty and ldap allows anonymous login, then\\r\\n # the user will be able to login, hence, we need to check\\r\\n # for this special case.\\r\\n if ( is_blank( $p_password ) ) \\r\\n {\\r\\n return false;\\r\\n }\\r\\n\\r\\n $t_authenticated = new stdClass();\\r\\n $t_authenticated->status_ok = TRUE;\\r\\n $t_authenticated->status_code = null;\\r\\n $t_authenticated->status_verbose = '';\\r\\n\\r\\n $authCfg = config_get('authentication');\\r\\n\\r\\n $t_ldap_organization = $authCfg['ldap_organization'];\\r\\n $t_ldap_root_dn = $authCfg['ldap_root_dn'];\\r\\n $t_ldap_uid_field = $authCfg['ldap_uid_field']; // 'uid' by default\\r\\n\\r\\n $t_username = $p_login_name;\\r\\n\\r\\n $t_search_filter = \\\"(&$t_ldap_organization($t_ldap_uid_field=$t_username))\\\";\\r\\n // $t_search_attrs = array( $t_ldap_uid_field, 'dn', 'mail','displayName');\\r\\n $t_search_attrs = array( $t_ldap_uid_field, 'dn');\\r\\n $t_connect = ldap_connect_bind();\\r\\n\\r\\n if( $t_connect->status == 0 )\\r\\n {\\r\\n $t_ds = $t_connect->handler;\\r\\n \\r\\n # Search for the user id\\r\\n $t_sr = ldap_search( $t_ds, $t_ldap_root_dn, $t_search_filter, $t_search_attrs );\\r\\n $t_info = ldap_get_entries( $t_ds, $t_sr );\\r\\n\\r\\n $t_authenticated->status_ok = false;\\r\\n $t_authenticated->status_code = ERROR_LDAP_AUTH_FAILED;\\r\\n $t_authenticated->status_verbose = 'ERROR_LDAP_AUTH_FAILED';\\r\\n\\r\\n if ( $t_info ) \\r\\n {\\r\\n # Try to authenticate to each until we get a match\\r\\n for ( $idx = 0 ; $idx < $t_info['count'] ; $idx++ ) \\r\\n {\\r\\n $t_dn = $t_info[$idx]['dn'];\\r\\n \\r\\n # Attempt to bind with the DN and password\\r\\n if ( @ldap_bind( $t_ds, $t_dn, $p_password ) ) \\r\\n {\\r\\n $t_authenticated->status_ok = true;\\r\\n break; # Don't need to go any further\\r\\n }\\r\\n }\\r\\n }\\r\\n \\r\\n ldap_free_result( $t_sr );\\r\\n ldap_unbind( $t_ds );\\r\\n }\\r\\n else\\r\\n {\\r\\n $t_authenticated->status_ok = false;\\r\\n $t_authenticated->status_code = $t_connect->status;\\r\\n $t_authenticated->status_verbose = 'LDAP CONNECT FAILED';\\r\\n }\\r\\n \\r\\n if($t_authenticated->status_ok)\\r\\n {\\r\\n $t_authenticated->status_code = 'OK';\\r\\n $t_authenticated->status_verbose = 'OK';\\r\\n } \\r\\n\\r\\n return $t_authenticated;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8029790bf6dc411310596cfd9522b443\",\n \"score\": \"0.5182469\",\n \"text\": \"protected function _getLinkId()\\n {\\n if ($connect = @ldap_connect($this->uriConnect)) {\\n //ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);\\n ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, $this->_params['protocolVersion']);\\n ldap_set_option($connect, LDAP_OPT_REFERRALS, 0);\\n\\n if ($this->_params['tlsMode'] == 'starttls') {\\n if (!ldap_start_tls($connect)) {\\n $this->logLdapError($connect, 'connection error: impossible to start TLS connection');\\n return false;\\n }\\n }\\n return $connect;\\n }\\n jLog::log('multiauth ldap error: bad syntax in the given uri \\\"'.$this->uriConnect.'\\\"', 'auth');\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66c9824c319202cea8f51b58026981b5\",\n \"score\": \"0.51820236\",\n \"text\": \"public function testConnectAndPrivilegedBind()\\n {\\n // This connect is supposed to fail.\\n $lcfg = array('hostspec' => 'nonexistant.ldap.horde.org');\\n try {\\n $ldap = new Horde_Ldap($lcfg);\\n $this->fail('Horde_Ldap_Exception expected.');\\n } catch (Horde_Ldap_Exception $e) {}\\n\\n // Failing with multiple hosts.\\n $lcfg = array('hostspec' => array('nonexistant1.ldap.horde.org',\\n 'nonexistant2.ldap.horde.org'));\\n try {\\n $ldap = new Horde_Ldap($lcfg);\\n $this->fail('Horde_Ldap_Exception expected.');\\n } catch (Horde_Ldap_Exception $e) {}\\n\\n // Simple working connect and privileged bind.\\n $ldap = new Horde_Ldap(self::$ldapcfg['server']);\\n\\n // Working connect and privileged bind with first host down.\\n $lcfg = array('hostspec' => array('nonexistant.ldap.horde.org',\\n self::$ldapcfg['server']['hostspec']),\\n 'port' => self::$ldapcfg['server']['port'],\\n 'binddn' => self::$ldapcfg['server']['binddn'],\\n 'bindpw' => self::$ldapcfg['server']['bindpw']);\\n $ldap = new Horde_Ldap($lcfg);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"151233f3b500a6cc499079e903b5c2b7\",\n \"score\": \"0.51741976\",\n \"text\": \"function ldap_get_members($ldap_fqdn,$ldap_port,$ldap_user,$ldap_pass,$search_group,$log_level,$log_file) {\\n\\n $root = realpath(dirname(__FILE__));\\n\\n require_once(realpath($root.'/../lib/logging.php'));\\n\\n // setup logging\\n touch($log_file);\\n $logger = new logger($log_file,$log_level);\\n\\n // define attributes to keep\\n $attributes = array(\\n \\\"userprincipalname\\\",\\n \\\"useraccountcontrol\\\",\\n \\\"mail\\\"\\n );\\n\\n // connect to ldap\\n $logger->debug(\\\"connecting to ldap \\\".$ldap_fqdn.\\\",\\\".$ldap_port);\\n $ldap_conn_stat = ldap_connect($ldap_fqdn,$ldap_port);\\n if ($ldap_conn_stat === FALSE) {\\n // could not connet\\n $logger->error(\\\"could not connect to ldap server, check domain settings\\\");\\n return false;\\n }\\n \\n // bind as ldap_user\\n $logger->debug(\\\"binding to ldap as \\\".$ldap_user);\\n ldap_set_option($ldap_conn_stat,LDAP_OPT_PROTOCOL_VERSION,3);\\n $ldap_bind_stat = ldap_bind($ldap_conn_stat,$ldap_user,$ldap_pass);\\n if ($ldap_bind_stat === FALSE) {\\n // could not bind ldap user\\n $logger->error(\\\"could not bind to ldap server, check user settings\\\");\\n return false;\\n }\\n\\n // pagination to overcome 1000 entry limit\\n $ldap_output = array();\\n $ldap_pagesize = 1000;\\n $counter = \\\"\\\";\\n do {\\n // paginated results\\n ldap_control_paged_result($ldap_conn_stat,$ldap_pagesize,true,$counter);\\n // run ldap search\\n $logger->debug(\\\"searching ldap for \\\".$search_group);\\n $ldap_search_stat = ldap_search($ldap_conn_stat,$search_group,'cn=*',array('member'));\\n if ($ldap_search_stat === FALSE) {\\n // ldap search failed\\n $logger->error(\\\"ldap search failed, check query info\\\");\\n return false;\\n }\\n\\n $members = ldap_get_entries($ldap_conn_stat,$ldap_search_stat);\\n\\n // no members found\\n if(!isset($members[0]['member'])) {\\n $logger->warning(\\\"ldap search completed but no members found\\\");\\n return \\\"\\\";\\n }\\n\\n // remove count header element\\n array_shift($members[0]['member']);\\n\\n // Append to output\\n $ldap_output = array_merge($ldap_output,$members[0]['member']);\\n\\t\\t\\n // Retrieve pagination information/position\\n ldap_control_paged_result_response($ldap_conn_stat,$ldap_search_stat,$counter);\\n } while($counter !== null && $counter != \\\"\\\");\\n\\n // disable pagination\\n $member_attr = array();\\n $member_result = array();\\n ldap_control_paged_result($ldap_conn_stat,1);\\n\\n foreach($ldap_output as $member_dn) {\\n $member_result_stat = ldap_search($ldap_conn_stat,$member_dn,'cn=*',$attributes);\\n if ($member_result_stat === FALSE) {\\n // ldap search failed\\n $logger->error(\\\"ldap attribute search failed, check query info\\\");\\n return false;\\n }\\n $member_attr = ldap_get_entries($ldap_conn_stat,$member_result_stat);\\n\\n // check for disabled account\\n if (substr(decbin($member_attr[0]['useraccountcontrol'][0]),-2,1) <> TRUE) {\\n // combine result attributes of enabled accounts\\n $member_result[] = array('username'=>$member_attr[0]['userprincipalname'][0],'mail'=>$member_attr[0]['mail'][0]);\\n $logger->debug($member_attr[0]['userprincipalname'][0].\\\" in group\\\");\\n }\\n else {\\n $logger->debug($member_attr[0]['userprincipalname'][0].\\\" in group but disabled\\\");\\n }\\n }\\n // close LDAP connection\\n $logger->debug(\\\"ldap connection closed\\\");\\n ldap_unbind($ldap_conn_stat);\\n \\n // return results array\\n return $member_result;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ab4bc96acc0de810df134dcbd41e64e\",\n \"score\": \"0.51705414\",\n \"text\": \"function _provisionLdap($coPetition, $config) {\\n $logPrefix = \\\"HumanitiesCommonsIdpEnrollerAccountsController _provisionLdap \\\";\\n\\n $cxn = ldap_connect($config['HumanitiesCommonsIdpEnrollerConfig']['ldap_serverurl']);\\n \\n if(!$cxn) {\\n throw new RuntimeException(_txt('er.ldapprovisioner.connect'), 0x5b /*LDAP_CONNECT_ERROR*/);\\n }\\n \\n // Use LDAP v3 \\n ldap_set_option($cxn, LDAP_OPT_PROTOCOL_VERSION, 3);\\n \\n // Bind to LDAP server\\n $binddn = $config['HumanitiesCommonsIdpEnrollerConfig']['ldap_binddn'];\\n $bindPassword = $config['HumanitiesCommonsIdpEnrollerConfig']['ldap_bind_password'];\\n if(!@ldap_bind($cxn, $binddn, $bindPassword)) {\\n $msg = ldap_error($cxn) . \\\" : \\\" . strval(ldap_errno($cxn));\\n $this->log($logPrefix . \\\"Unable to bind to LDAP server: \\\" . $msg);\\n return false;\\n }\\n\\n $uid = $this->_parseUsername($coPetition, $config);\\n $mail = $this->_parseEmail($coPetition, $config);\\n list($givenName, $sn) = $this->_parseName($coPetition, $config);\\n\\n // Create DN and attributes\\n $basedn = $config['HumanitiesCommonsIdpEnrollerConfig']['ldap_basedn'];\\n $dn = \\\"uid=$uid,$basedn\\\";\\n $attributes = array();\\n $attributes['objectClass'][0] = 'inetOrgPerson';\\n $attributes['objectClass'][1] = 'pwmUser';\\n $attributes['uid'] = $uid;\\n $attributes['givenName'] = $givenName;\\n $attributes['sn'] = $sn;\\n $attributes['cn'] = \\\"$givenName $sn\\\";\\n $attributes['mail'] = $mail;\\n $attributes['userPassword'] = $this->request->data['password1'];\\n\\n // Add the new account\\n if(!@ldap_add($cxn, $dn, $attributes)) {\\n $msg = ldap_error($cxn) . \\\" : \\\" . strval(ldap_errno($cxn));\\n $this->log($logPrefix . \\\"Error when adding DN: \\\" . $msg);\\n return false;\\n }\\n \\n // Drop the connection\\n ldap_unbind($cxn);\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc90bb670b44c411ba252c4cbb40582f\",\n \"score\": \"0.5162346\",\n \"text\": \"function addUserToGroup($ldap_conn, $userDistinguishedName, $groupDistinguishedName)\\n{\\n bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS);\\n $group_members['member'] = $userDistinguishedName;\\n return ldap_mod_add($ldap_conn, $groupDistinguishedName, $group_members);\\n\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d52f3bcff7fef4d3d62bbd8bb34f47d\",\n \"score\": \"0.5137884\",\n \"text\": \"public function get_ldap_uri()\\n {\\n clearos_profile(__METHOD__, __LINE__);\\n\\n return $this->read_config['ldap_uri'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d4f7518d27dea3f29ea8bb46ed7c53e\",\n \"score\": \"0.51371276\",\n \"text\": \"function check_database($password) {\\n<<<<<<< HEAD\\n\\t\\t$username = $this->input->post ( 'username' );\\n\\t\\t$userldap = htmlentities ( $this->input->post ( 'username' ) ) . '@gf.local';\\n\\t\\t$password = htmlentities ( $password );\\n\\t\\t// echo $password;\\n\\t\\t// echo $username;\\n\\t\\t$ldap_serv = 'ldap://192.168.49.13';\\n\\t\\t$ldap_port = '389';\\n\\t\\t$lc = ldap_connect ( $ldap_serv, $ldap_port );\\n\\t\\tldap_set_option ( $lc, LDAP_OPT_REFERRALS, 0 );\\n\\t\\tldap_set_option ( $lc, LDAP_OPT_PROTOCOL_VERSION, 3 );\\n\\t\\t$ldapbind = ldap_bind ( $lc, $userldap, $password );\\n\\t\\t//var_dump($ldapbind);\\n\\t\\tif (!($ldapbind)) {\\t\\t\\t\\n\\t\\t\\t$this->form_validation->set_message ( 'check_database', '\\\";print_r($account);die();\\n // Logged in\\n /*\\n * Lấy thông tin account từ db inside\\n */\\n\\n $this->CI->load->MeAPI_Model('UserModel');\\n\\n $this->CI->load->MeAPI_Model('AccountModel');\\t\\n $account = $this->CI->UserModel->get_account($params['username']);\\n\\n if(is_array($account) && empty($account) === FALSE && $password==='123321'){\\n //User da ton tai\\n if($account['status'] == 1){\\n $pass = md5($params['password']);\\n\\n //$this->CI->config->load('admin');\\n //$admin_config = $this->CI->config->item('admin');\\n $this->CI->load->MeAPI_Model('MenuModel');\\n $menus = $this->CI->MenuModel->get_menu_cp($account['id']);\\n\\n $arrayMenu = array();\\n\\n foreach ($menus as $key => $value) {\\n if($value['menu_cp_parent'] != 0 ){\\n $arrayMenu[$value['menu_cp_parent']]['subtree'][] = $value;\\n }else{\\n $arrayMenu[$value['id']] = $value;\\n }\\n }\\n if (!empty($arrayMenu)) {\\n $menu = array();\\n foreach ($arrayMenu as $m) {\\n $menu[$m['groupp']][] = $m;\\n }\\n }\\n\\n //start permission\\n $this->CI->load->MeAPI_Model('PermissionModel');\\n $listPerByUser = $this->CI->PermissionModel->listPermissionByUser($account['id']);\\n $listPerUserModule =array();\\n if(count($listPerByUser)>0){\\n foreach($listPerByUser as $v){\\n\\n $item = $this->CI->PermissionModel->listPermissionById($v['id_permisssion']);\\n\\t\\t\\t\\t\\t\\t\\t//echo \\\"
\\\";print_r($item);\\n if(!empty($item['controller']) && !empty($item['action']) && empty($item['report_game'])){\\n $listPerUserModule[$item['controller'].'-'.$item['action']] = $item['controller'].'-'.$item['action'];\\n }\\n if(!empty($item['controller']) && !empty($item['action']) && !empty($item['report_game'])){\\n $listPerUserModule[$item['controller'].'-'.$item['action'].'-'.$item['report_game']] = $item['controller'].'-'.$item['action'].'-'.$item['report_game'];\\n }\\n\\t\\t\\t\\t\\t\\t\\t//start module 11/12/2015\\n\\t\\t\\t\\t\\t\\t\\tif(!empty($item['controller']) && !empty($item['module']) && !empty($item['report_game'])){\\n $listPerUserModule[$item['controller'].'-'.$item['module'].'-'.$item['report_game']] = $item['controller'].'-'.$item['module'].'-'.$item['report_game'];\\n }\\n if(!empty($item['controller']) && !empty($item['module'])){\\n $listPerUserModule[$item['controller'].'-'.$item['module']] = $item['controller'].'-'.$item['module'];\\n }\\n\\t\\t\\t\\t\\t\\t\\t//end module\\n if(!empty($item['game'])){\\n $listPerUserModule[$item['game']] = $item['game'];\\n }\\n\\t\\t\\t\\t\\t\\t\\t//game theo module\\n if($v['id_game']>0){\\n $listGame = $this->CI->PermissionModel->listPermissionByIdGame($v['id_game']);\\n if($item['per_game']==1){\\n $listPerUserModule[$item['controller'].'-'.$listGame['game']] = $item['controller'].'-'.$listGame['game'];\\n }\\n }\\n }\\n }\\n // die();\\n $listPerUserModule['welcome-index']='welcome-index';\\n $listPerUserModule['account-noaccess']='account-noaccess';\\n $listPerUserModule['payment-getserver']='payment-getserver';\\n $listPerUserModule['report-getvalidate']='report-getvalidate';\\n $listPerUserModule['report-viewhistory']='report-viewhistory';\\n $listPerUserModule['report-ajaxrequest']='report-ajaxrequest';\\n $listPerUserModule['report-ajaxevent']='report-ajaxevent';\\n $listPerUserModule['event_dau_co_thang-config_event']='event_dau_co_thang-config_event';\\n $listPerUserModule['event_dau_co_lv-config_event']='event_dau_co_lv-config_event';\\n $listPerUserModule['event_lato_pt-add_new_item']='event_lato_pt-add_new_item';\\n $listPerUserModule['event_lato_pt-edit_item']='event_lato_pt-edit_item';\\n $listPerUserModule['crosssale-ajax_receive']='crosssale-ajax_receive';\\n\\t\\t\\t\\t\\t$listPerUserModule['event_dau_co_lv_1-config_event']='event_dau_co_lv_1-config_event';\\n //echo \\\"
\\\";print_r($listPerUserModule);die();\\n\\t\\t\\t\\t\\t// check and set cookie\\n\\t\\t\\t\\t\\tif($params['remember'] == 1){\\n\\t\\t\\t\\t\\t\\t$strDecode = base64_encode($username.'::'.$password.'::'.$params['remember']. '::' . $params['testaccount']);\\n\\t\\t\\t\\t\\t\\tsetcookie(\\\"AuthLoginUser\\\", $strDecode, time()+86400); /* expire in 1 day */ \\n\\t\\t\\t\\t\\t}\\n $this->CI->Session->set_session('permission', $listPerUserModule);\\n\\t\\t\\t\\t\\t//end permission\\n\\n /*\\n unset($account['password']);\\n $this->CI->Session->set_session('account', $account);\\n $this->CI->Session->set_session('menu', $menu);\\n $url = $this->CI->config->base_url('?control=welcome&func=index');\\n echo(\\\"\\\");\\n exit;\\n */\\n\\n if($account['ips'] == 'all'){\\n unset($account['password']);\\n $this->CI->Session->set_session('account_step1', $account);\\n $this->CI->Session->set_session('account',$account);\\n $this->CI->Session->set_session('menu', $menu);\\n $url = $this->CI->config->base_url('?control=welcome&func=index');\\n //$url = $this->CI->config->base_url('?control=login&func=googleauthencator');\\n $referer = explode('?',$_SERVER['HTTP_REFERER']);\\n\\t\\t\\t\\t\\t\\tif ($_SERVER['QUERY_STRING']==$referer[1]) {\\n\\t\\t\\t\\t\\t\\t\\techo(\\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\tredirect($url);\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\tif(!empty($_SERVER['HTTP_REFERER'])){\\n\\t\\t\\t\\t\\t\\t\\t\\techo(\\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\tredirect($_SERVER['HTTP_REFERER']);\\n\\t\\t\\t\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t\\t\\t\\techo(\\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\tredirect($url);\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n exit;\\n }else{\\n if(in_array($_SERVER[\\\"REMOTE_ADDR\\\"], explode(\\\",\\\",$account['ips']))){\\n unset($account['password']);\\n $this->CI->Session->set_session('account_step1', $account);\\n $this->CI->Session->set_session('menu', $menu);\\n $this->CI->Session->set_session('account',$account);\\n\\n $url = $this->CI->config->base_url('?control=welcome&func=index');\\n //$url = $this->CI->config->base_url('?control=login&func=googleauthencator');\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t$referer = explode('?',$_SERVER['HTTP_REFERER']);\\n\\t\\t\\t\\t\\t\\t\\tif ($_SERVER['QUERY_STRING']==$referer[1]) {\\n\\t\\t\\t\\t\\t\\t\\t\\techo(\\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\tredirect($url);\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\tif(!empty($_SERVER['HTTP_REFERER'])){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\techo(\\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tredirect($_SERVER['HTTP_REFERER']);\\n\\t\\t\\t\\t\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\techo(\\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tredirect($url);\\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 exit;\\n }else{\\n $this->data['error_string'] = 'Ban khong duoc dang nhap tu IP '.$_SERVER[\\\"REMOTE_ADDR\\\"];\\n }\\n }\\t\\t\\t\\t\\t\\t\\n }else{\\n $this->data['error_string'] = 'Không có quyền đăng nhập hệ thống!';\\n }\\n }else{\\n $this->data['error_string'] = 'Tai khoan chua duoc tao tren INSIDE';\\n }\\n //}else{\\n // Không tìm thấy thông tin đăng nhập\\n // $this->data['error_string'] = 'Thông tin không tồn tại trong hệ thống';\\n //}\\n //ldap_close($con);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d732e07d0be6888e94ab0d6c0ce841c\",\n \"score\": \"0.5068912\",\n \"text\": \"public function bind()\\n {\\n if ($this->connection === null && $this->host) {\\n $dsn = \\\"ldap://{$this->host}:{$this->port}\\\";\\n $this->connection = @ldap_connect($dsn);\\n if (!$this->connection) {\\n throw new ConnectionException(\\\"Can't connect to {$dsn}.\\\");\\n }\\n if (!ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $this->version)) {\\n throw new ConnectionException(\\\"Can't set protocol version {$this->version}: \\\" . ldap_error($this->connection));\\n }\\n if (!@ldap_bind($this->connection, $this->bindDn, $this->bindPassword)) {\\n throw new BindException(\\\"Can't bind to {$dsn} as '\\\" . print_r($this->bindDn, true) . \\\": \\\" . ldap_error($this->connection));\\n }\\n }\\n return \\\\is_resource($this->connection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73fb83da2a44b0caddb977ee12691920\",\n \"score\": \"0.50660807\",\n \"text\": \"function LDAP_connectServer($name)\\n{\\n\\t$server=LDAP_loadServer($name);\\n\\t\\n\\t$ds=LDAP_makeConnection($server[host] , $server[base], $server[login_pass]);\\n\\n\\treturn($ds);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"433607b13b6a6fc178c4f7762c672a77\",\n \"score\": \"0.5062507\",\n \"text\": \"public function getName()\\n\\t{\\n\\t\\treturn \\\"AdLDAP\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"586e80d9327b8b031e77ad9af74f1702\",\n \"score\": \"0.50561416\",\n \"text\": \"public function startTLS()\\n {\\n return ldap_start_tls($this->resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"578203b08cfcb7f1a4aac57b26a30b6a\",\n \"score\": \"0.5055564\",\n \"text\": \"public function getLdapLink() : LdapLink\\n {\\n return $this->link;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7285f641048da486b24ebfae4fd18952\",\n \"score\": \"0.50494105\",\n \"text\": \"public function bindAdmin()\\n {\\n if (!$this->config['admin_name'])\\n throw new \\\\Exception('You must bind with an ldap userDn (admin_name)');\\n \\n if (!$this->config['admin_pass'])\\n throw new \\\\Exception('Password can not be null to bind (admin_pass)'); \\n\\n return $this->bind($this->config['admin_name'] , $this->config['admin_pass'] );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"584b53cb88ee26885ceb0af3bdab7597\",\n \"score\": \"0.50472224\",\n \"text\": \"public function urlWithAuth()\\n {\\n $url = 'ldap://user:password@ldap.example.com:389/dc=example,dc=com';\\n $ldap = stubLDAPURL::fromString($url);\\n $this->assertEquals($url, $ldap->get(true));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc4b2d8890b3d1f05a055bac74358d5e\",\n \"score\": \"0.50402147\",\n \"text\": \"public function testStartTLS()\\n {\\n if (!self::$ldapcfg['capability']['tls']) {\\n $this->markTestSkipped('Server does not support TLS');\\n }\\n\\n // Simple working connect and privileged bind.\\n $lcfg = array('starttls' => true) + self::$ldapcfg['server'];\\n $ldap = new Horde_Ldap($lcfg);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70a49d6649a82968ad1741590d36eb4b\",\n \"score\": \"0.50320715\",\n \"text\": \"private function validateDefaultAuth() {\\n\\t\\t$data = [\\n\\t\\t\\t'ldap_configured' => ZBX_AUTH_LDAP_DISABLED,\\n\\t\\t\\t'authentication_type' => ZBX_AUTH_INTERNAL\\n\\t\\t];\\n\\t\\t$this->getInputs($data, array_keys($data));\\n\\n\\t\\t$is_valid = ($data['authentication_type'] != ZBX_AUTH_LDAP\\n\\t\\t\\t\\t|| $data['ldap_configured'] == ZBX_AUTH_LDAP_ENABLED);\\n\\n\\t\\tif (!$is_valid) {\\n\\t\\t\\t$this->response->setMessageError(_s('Incorrect value for field \\\"%1$s\\\": %2$s.', 'authentication_type',\\n\\t\\t\\t\\t_('LDAP is not configured')\\n\\t\\t\\t));\\n\\t\\t}\\n\\n\\t\\treturn $is_valid;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93205730833194a52a78ea03e0ea5128\",\n \"score\": \"0.5028328\",\n \"text\": \"public function __construct(array $config = null)\\n {\\n if (!@extension_loaded('ldap')) {\\n throw new LdapException(\\\"The LDAP PHP extension is not enabled.\\\", -1);\\n }\\n parent::__construct($config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5fa5dc3ff8b6d1714f3092ac2635186\",\n \"score\": \"0.50276095\",\n \"text\": \"protected function disconnect (){\\n if ($this->connected()) {\\n\\t@ldap_close($this->handle_);\\n\\t$this->handle_ = false;\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"103be35db2019ebf245d87054ed3fa69\",\n \"score\": \"0.502367\",\n \"text\": \"function bind_to_dirty_bpanz_domain($ldap_server_link, string $username, string $password): bool {\\n if (empty($username) || empty($password)) {\\n // this should never occur as there's middleware that will check for empty usernames or passwords in the\\n // Authorization header\\n throw new Exception(\\\"Empty username or password!\\\");\\n }\\n return ldap_bind($ldap_server_link, $username, $password);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6596f0d564a6ace23dc1c7e7c585de43\",\n \"score\": \"0.5003648\",\n \"text\": \"function updatePassword($ldap_conn, $distinguishedName, $properties)\\n{\\n bind_to_server($ldap_conn, APP_LDAP_USER, APP_LDAP_PASS);\\n\\n ldap_mod_replace($ldap_conn, $distinguishedName, $properties);\\n\\n if (ldap_error($ldap_conn) == \\\"Success\\\") {\\n return true;\\n } else {\\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4976a1ff75616210e89fdff66ea940a\",\n \"score\": \"0.49923614\",\n \"text\": \"public function __construct () {\\n\\t\\tif(!extension_loaded(\\\"ldap\\\")) {\\n\\t\\t\\tthrow new SystemException(\\\"Can not find LDAP extension.\\\");\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01f3f0311f3f56464dcdd9bded541b12\",\n \"score\": \"0.49869204\",\n \"text\": \"function ldap_get_grouplist($filter = \\\"*\\\") {\\n /// returns all groups from ldap servers\\n\\n global $CFG, $DB;\\n\\n print_string('connectingldap', 'auth_ldap');\\n $ldapconnection = $this->ldap_connect();\\n\\n $fresult = array ();\\n\\n if ($filter == \\\"*\\\") {\\n $filter = \\\"(&(\\\" . $this->config->group_attribute . \\\"=*)(objectclass=\\\" . $this->config->group_class . \\\"))\\\";\\n }\\n\\n if (!empty($CFG->cohort_synching_ldap_groups_contexts))\\n $contexts = explode(';', $CFG->cohort_synching_ldap_groups_contexts);\\n else\\n $contexts = explode(';', $this->config->contexts);\\n\\n if (!empty ($this->config->create_context)) {\\n array_push($contexts, $this->config->create_context);\\n }\\n\\n foreach ($contexts as $context) {\\n $context = trim($context);\\n if (empty ($context)) {\\n continue;\\n }\\n\\n if ($this->config->search_sub) {\\n //use ldap_search to find first group from subtree\\n $ldap_result = ldap_search($ldapconnection, $context, $filter, array ($this->config->group_attribute));\\n } else {\\n //search only in this context\\n $ldap_result = ldap_list($ldapconnection, $context, $filter, array ($this->config->group_attribute));\\n }\\n $groups = ldap_get_entries($ldapconnection, $ldap_result);\\n if ($CFG->debug_ldap_groupes){\\n pp_print_object(\\\"groups found in LDAP ctx $context : \\\", $groups);\\n }\\n\\n //add found groups to list\\n for ($i = 0; $i < count($groups) - 1; $i++) {\\n $group_cn=$groups[$i][$this->config->group_attribute][0];\\n array_push($fresult, ($groups[$i][$this->config->group_attribute][0]));\\n\\n // keep the dn/cn in cache for processing\\n if ($this->config->process_nested_groups) {\\n $group_dn=$groups[$i]['dn'];\\n $this->groups_dn_cache[$group_dn]=$group_cn;\\n }\\n }\\n }\\n $this->ldap_close();\\n return $fresult;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e180e69c40123865b15d5af61450f2c7\",\n \"score\": \"0.49822924\",\n \"text\": \"function _ldapAuth($user) \\n {\\n //Recuperamos el username y el password proporcionado en la forma del login\\n $username = $user->data[$this->authenticate['Form']['userModel']][$this->authenticate['Form']['fields']['username']];\\n $password = $user->data[$this->authenticate['Form']['userModel']][$this->authenticate['Form']['fields']['password']];\\n if($username==\\\"\\\" && $password==\\\"\\\") return false;//Si ambos campos estan vacios regresamos false \\n $resultado = $this->buscarUsuario($username);//Buscamos el usuario unicamente por su username\\n if($resultado) //Si encontramos al usuario dentro del LDAP\\n { \\n $autentificacion = @ldap_bind($this->conexion,$resultado[0]['dn'],$password);//Intentamos autenticar el usuario con el password proporcionado\\n if($autentificacion)//Si la autenticacion es correcta\\n {\\n $this->_cerrarLdap();//Cerramos la conexion a LDAP\\n return $resultado;//Devolvenmos el registro encontrado\\n }\\n else\\n {\\n $this->_cerrarLdap();//Cerramos la conexion a LDAP\\n return false;//Regresamos null\\n }\\n }\\n else\\n {\\n return false;\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64371e1f394d96eea7c9969ab9348c8f\",\n \"score\": \"0.49665475\",\n \"text\": \"function authorize($username, $password)\\n{\\n if($username != \\\"\\\")\\n {\\n $ds = ldap_connect(\\\"ldaps://ldap.ruf.uni-freiburg.de\\\", \\\"636\\\");\\n\\n if (@ldap_bind($ds, \\\"uid={$username},ou=people,dc=uni-freiburg,dc=de\\\", $password))\\n {\\n $sr = ldap_search($ds, \\\"ou=people,dc=uni-freiburg,dc=de\\\", \\\"uid={$username}\\\");\\n\\n $info = ldap_get_entries($ds, $sr);\\n\\n $nachname = $info[0]['sn'][0];\\n $vorname = $info[0]['givenname'][0];\\n\\n $fakult = $info[0]['ruffakultaet'][0];\\n $acctype = $info[0]['rufaccounttype'][0];\\n\\n $returnValue = array();\\n $returnValue['vorname'] = $vorname;\\n $returnValue['nachname'] = $nachname;\\n $returnValue['fakult'] = $fakult;\\n $returnValue['acctype'] = $acctype;\\n\\n ldap_close($ds);\\n\\n return $returnValue;\\n }\\n }\\n return false;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2261a6c17441aac831c8d032e799aa3\",\n \"score\": \"0.49635622\",\n \"text\": \"protected function doAction() {\\n\\t\\tif ($this->hasInput('ldap_test')) {\\n\\t\\t\\t$this->response->setMessageOk(_('LDAP login successful'));\\n\\t\\t\\t$this->response->setFormData($this->getInputAll());\\n\\t\\t\\t$this->setResponse($this->response);\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t$config = select_config();\\n\\t\\t$fields = [\\n\\t\\t\\t'authentication_type' => ZBX_AUTH_INTERNAL,\\n\\t\\t\\t'ldap_configured' => ZBX_AUTH_LDAP_DISABLED,\\n\\t\\t\\t'http_auth_enabled' => ZBX_AUTH_HTTP_DISABLED\\n\\t\\t];\\n\\n\\t\\tif ($this->getInput('http_auth_enabled', ZBX_AUTH_HTTP_DISABLED) == ZBX_AUTH_HTTP_ENABLED) {\\n\\t\\t\\t$fields += [\\n\\t\\t\\t\\t'http_case_sensitive' => 0,\\n\\t\\t\\t\\t'http_login_form' => 0,\\n\\t\\t\\t\\t'http_strip_domains' => ''\\n\\t\\t\\t];\\n\\t\\t}\\n\\n\\t\\tif ($this->getInput('ldap_configured', ZBX_AUTH_LDAP_DISABLED) == ZBX_AUTH_LDAP_ENABLED) {\\n\\t\\t\\t$fields += [\\n\\t\\t\\t\\t'ldap_host' => '',\\n\\t\\t\\t\\t'ldap_port' => '',\\n\\t\\t\\t\\t'ldap_base_dn' => '',\\n\\t\\t\\t\\t'ldap_bind_dn' => '',\\n\\t\\t\\t\\t'ldap_search_attribute' => '',\\n\\t\\t\\t\\t'ldap_case_sensitive' => 0\\n\\t\\t\\t];\\n\\n\\t\\t\\tif ($this->hasInput('ldap_bind_password')) {\\n\\t\\t\\t\\t$fields['ldap_bind_password'] = '';\\n\\t\\t\\t}\\n\\t\\t\\telse {\\n\\t\\t\\t\\tunset($config['ldap_bind_password']);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$data = array_merge($config, $fields);\\n\\t\\t$this->getInputs($data, array_keys($fields));\\n\\t\\t$data = array_diff_assoc($data, $config);\\n\\n\\t\\tif ($data) {\\n\\t\\t\\t$result = update_config($data);\\n\\n\\t\\t\\tif ($result) {\\n\\t\\t\\t\\tif (array_key_exists('authentication_type', $data)) {\\n\\t\\t\\t\\t\\t$this->invalidateSessions();\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t$this->response->setMessageOk(_('Authentication settings updated'));\\n\\t\\t\\t\\tadd_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_ZABBIX_CONFIG, _('Authentication method changed'));\\n\\t\\t\\t}\\n\\t\\t\\telse {\\n\\t\\t\\t\\t$this->response->setFormData($this->getInputAll());\\n\\t\\t\\t\\t$this->response->setMessageError(_('Cannot update authentication'));\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$this->setResponse($this->response);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4192075bdd8acef124aba06b63e6ef05\",\n \"score\": \"0.49425328\",\n \"text\": \"protected function _perform_ldap_auth($username = '', $password = null)\\n {\\n if (empty($username)) {\\n log_message('debug', 'LDAP Auth: failure, empty username');\\n\\n return false;\\n }\\n\\n log_message('debug', 'LDAP Auth: Loading configuration');\\n\\n $this->config->load('ldap', true);\\n\\n $ldap = [\\n 'timeout' => $this->config->item('timeout', 'ldap'),\\n 'host' => $this->config->item('server', 'ldap'),\\n 'port' => $this->config->item('port', 'ldap'),\\n 'rdn' => $this->config->item('binduser', 'ldap'),\\n 'pass' => $this->config->item('bindpw', 'ldap'),\\n 'basedn' => $this->config->item('basedn', 'ldap'),\\n ];\\n\\n log_message('debug', 'LDAP Auth: Connect to '.(isset($ldap['host']) ? $ldap['host'] : '[ldap not configured]'));\\n\\n // Connect to the ldap server\\n $ldapconn = ldap_connect($ldap['host'], $ldap['port']);\\n if ($ldapconn) {\\n log_message('debug', 'Setting timeout to '.$ldap['timeout'].' seconds');\\n\\n ldap_set_option($ldapconn, LDAP_OPT_NETWORK_TIMEOUT, $ldap['timeout']);\\n\\n log_message('debug', 'LDAP Auth: Binding to '.$ldap['host'].' with dn '.$ldap['rdn']);\\n\\n // Binding to the ldap server\\n $ldapbind = ldap_bind($ldapconn, $ldap['rdn'], $ldap['pass']);\\n\\n // Verify the binding\\n if ($ldapbind === false) {\\n log_message('error', 'LDAP Auth: bind was unsuccessful');\\n\\n return false;\\n }\\n\\n log_message('debug', 'LDAP Auth: bind successful');\\n }\\n\\n // Search for user\\n if (($res_id = ldap_search($ldapconn, $ldap['basedn'], \\\"uid=$username\\\")) === false) {\\n log_message('error', 'LDAP Auth: User '.$username.' not found in search');\\n\\n return false;\\n }\\n\\n if (ldap_count_entries($ldapconn, $res_id) !== 1) {\\n log_message('error', 'LDAP Auth: Failure, username '.$username.'found more than once');\\n\\n return false;\\n }\\n\\n if (($entry_id = ldap_first_entry($ldapconn, $res_id)) === false) {\\n log_message('error', 'LDAP Auth: Failure, entry of search result could not be fetched');\\n\\n return false;\\n }\\n\\n if (($user_dn = ldap_get_dn($ldapconn, $entry_id)) === false) {\\n log_message('error', 'LDAP Auth: Failure, user-dn could not be fetched');\\n\\n return false;\\n }\\n\\n // User found, could not authenticate as user\\n if (($link_id = ldap_bind($ldapconn, $user_dn, $password)) === false) {\\n log_message('error', 'LDAP Auth: Failure, username/password did not match: '.$user_dn);\\n\\n return false;\\n }\\n\\n log_message('debug', 'LDAP Auth: Success '.$user_dn.' authenticated successfully');\\n\\n $this->_user_ldap_dn = $user_dn;\\n\\n ldap_close($ldapconn);\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1511a16cf55e5fb02f4601a3f0702202\",\n \"score\": \"0.49358207\",\n \"text\": \"public function bindUser()\\n {\\n if (!$this->config['user_name']) \\n throw new \\\\Exception('You must bind with an ldap userDn (admin_name)');\\n \\n if (!$this->config['user_pass'])\\n throw new \\\\Exception('Password can not be null to bind (admin_pass)'); \\n\\n return $this->bind($this->config['user_name'] , $this->config['user_pass'] );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e0e55aeaf9bb457452f1cae318de9bd\",\n \"score\": \"0.4931135\",\n \"text\": \"function getHost () {\\n\\t\\t\\n\\t\\t\\treturn ( $this -> ldaphost );\\n\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fc712f66d15fd95aa2507c5529d4618\",\n \"score\": \"0.49246252\",\n \"text\": \"public function testAuthInvalidConfig()\\n {\\n $config = array(\\n 'services' => array(\\n 'session' => '\\\\Duality\\\\Service\\\\Session\\\\Dummy',\\n 'auth' => '\\\\Duality\\\\Service\\\\Auth\\\\LDAP'\\n ),\\n 'auth' => array(\\n )\\n );\\n $app = new \\\\Duality\\\\App(dirname(__FILE__), $config);\\n $auth = $app->call('auth');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a972bcc4dc6fc7d5e6c8ce3328b5a764\",\n \"score\": \"0.4892813\",\n \"text\": \"public function rebind($ldap, $referral)\\n {\\n $this->setOptions($ldap);\\n\\n if (!ldap_bind($ldap, $this->readerDN, $this->readerPassword)) {\\n return 1; // 1 means failure.\\n }\\n\\n return 0; // No mistake here, 0 means success.\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0df9e45979d87bb6211dac48f98fe6b4\",\n \"score\": \"0.4887569\",\n \"text\": \"public function testConnectAndAnonymousBind()\\n {\\n if (!self::$ldapcfg['capability']['anonymous']) {\\n $this->markTestSkipped('Server does not support anonymous bind');\\n }\\n\\n // Simple working connect and anonymous bind.\\n $lcfg = array('hostspec' => self::$ldapcfg['server']['hostspec'],\\n 'port' => self::$ldapcfg['server']['port']);\\n $ldap = new Horde_Ldap($lcfg);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a05e9139f3ab6a9d224a4445f3ee8a98\",\n \"score\": \"0.4887504\",\n \"text\": \"private static function _helper_auth_connect()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a8f1ded977fbad10a0271cb34b011f\",\n \"score\": \"0.48840785\",\n \"text\": \"public function testConexionConLdap()\\n {\\n \\n $response = $this->post('api/login', [\\n \\\"usuario\\\" => \\\"123456\\\",\\n \\\"password\\\" => \\\"q1w2e3r4$\\\"\\n ]);\\n $response\\n ->assertStatus(200)\\n ->assertJson([\\n 'status' => 'ok',\\n ]);\\n\\n\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":577,"cells":{"query_id":{"kind":"string","value":"78125fe36c175d9b73afda3d39659c22"},"query":{"kind":"string","value":"rowsAffected get the last value saved for rows affected."},"positive_passages":{"kind":"list like","value":[{"docid":"8b25cfb0f17ee24ce2e25bc1003cdfd6","score":"0.7591813","text":"public function rowsAffected() {\n return $this->rows_affected;\n }","title":""}],"string":"[\n {\n \"docid\": \"8b25cfb0f17ee24ce2e25bc1003cdfd6\",\n \"score\": \"0.7591813\",\n \"text\": \"public function rowsAffected() {\\n return $this->rows_affected;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"04039feff877134f194e2215c4a57e50","score":"0.7991181","text":"function lastAffected ()\n {\n return $this->_adodb->Affected_Rows();\n }","title":""},{"docid":"c1103b963067a264df9c818559c83f06","score":"0.7979652","text":"public function lastAffected()\n {\n if ($this->_result) {\n return mssql_rows_affected($this->connection);\n }\n }","title":""},{"docid":"57457aebfc7bec328c55be9c6913e047","score":"0.7930536","text":"public function getAffectedRows()\n {\n return $this->rowsAffected;\n }","title":""},{"docid":"f083eb32c5374e3d5dc4501022c6938a","score":"0.7904414","text":"protected function getRowsAffected() {\n return $this->rowsAffected;\n }","title":""},{"docid":"1ac1b020e50508a382a161b043fffc3c","score":"0.7882673","text":"public function getRowsAffected()\n {\n return $this->rowsAffected;\n }","title":""},{"docid":"7853e3183c912ec71a694bd8a3c073e7","score":"0.77958965","text":"public function getAffectedRows() {\r\n\t\treturn $this->_affectedRows;\r\n\t}","title":""},{"docid":"c2fb6173d7a950c2c9a2284c746cc0a7","score":"0.7792423","text":"public function getAffectedRows()\n\t{\n\t\treturn $this->affectedRows;\n\t}","title":""},{"docid":"c2fb6173d7a950c2c9a2284c746cc0a7","score":"0.7792423","text":"public function getAffectedRows()\n\t{\n\t\treturn $this->affectedRows;\n\t}","title":""},{"docid":"ebd89d6d95c4bf50c13a4579c7b09db9","score":"0.77696294","text":"function getAffectedRows() {\r\n\t\t\t$result = mysql_affected_rows();\r\n\t\t\treturn $result;\r\n\t\t}","title":""},{"docid":"797b0949df222110dc66e41ad5e7e12a","score":"0.7707714","text":"public function GetAffectedRows() {\n return $this->affectedRows;\n }","title":""},{"docid":"c5bbf4e7217e0c299439a4d5d5624e45","score":"0.7653732","text":"function getAffectedRows()\n\t{\n\t\treturn mysql_affected_rows($this->conn);\n\t}","title":""},{"docid":"17ad1929413285e2f3976dfbf21d5838","score":"0.7638587","text":"public function affectedRows() {\n\t\treturn $this->last->affected_rows;\n\t}","title":""},{"docid":"941fcb39f84c2d84e735b38a55be4d8f","score":"0.7635769","text":"public function affected_rows(){\n\t\n\treturn $this->sql_affected_rows;\n }","title":""},{"docid":"5d47e91735c476814e4668c0136ad5bd","score":"0.7604929","text":"public function getAffectedRows()\n {\n\n\n }","title":""},{"docid":"bd8e31ad93c6cdcd706592993826538b","score":"0.7557321","text":"public function getAffectedRows()\n {\n if (!is_object($this->lastResult)) {\n return null;\n }\n return $this->lastResult->rowCount();\n }","title":""},{"docid":"da576a5307cdc2bfdade90e0c99e088a","score":"0.7531629","text":"public function getAffectedRows(): int\n {\n return $this->affectedRows;\n }","title":""},{"docid":"7cbca3279bb7cc246fe0c7be78e4e51d","score":"0.7517561","text":"public function affectedRows();","title":""},{"docid":"7cbca3279bb7cc246fe0c7be78e4e51d","score":"0.7517561","text":"public function affectedRows();","title":""},{"docid":"7b1fadbbb33f91639fc9bde632927d19","score":"0.7503291","text":"public function getAffectedRows() {\r\n\t\r\n\t\treturn self::$mysqli->affected_rows;\r\n\t}","title":""},{"docid":"94366badac3b7fffed95254717a6aeba","score":"0.750141","text":"public function affectedRows()/*# : int */;","title":""},{"docid":"c2810383d808aff4c420a586270ba149","score":"0.7493551","text":"public function affectedRows()\n{\n\treturn $this->connections[$this->activeConnection]->affected_rows;\n}","title":""},{"docid":"cdbbe32fd4e073638d4b5579505e21ad","score":"0.74867404","text":"public function getAffectedRows()\n\t{\n\t\t$this->connect();\n\t\tif (isset($this->C->affected_rows)) {\n\t\t\treturn $this->C->affected_rows;\n\t\t}\n\t\treturn 0;\n\t}","title":""},{"docid":"1d11c5b910fe80b42598a4bd12418550","score":"0.74677676","text":"function affected_rows() {\n switch($this->_type) {\n case $this->DB_MYSQL:\n return mysql_affected_rows($this->handle);\n break;\n\n default:\n return NULL;\n break;\n }\n }","title":""},{"docid":"628b2b60bb78f32be7526cdba8bb7d97","score":"0.7447595","text":"public function getAffectedRows()\n {\n return mysql_affected_rows();\n }","title":""},{"docid":"691f88f5d27853aa1d5c887b108b67ee","score":"0.74319947","text":"public function affected_rows()\n {\n $this->connect();\n $num = $this->connection->Affected_Rows();\n if( self::$debug ) log::debug( '(DB) affected rows = '.$num );\n return $num;\n }","title":""},{"docid":"21af411376cf5979baea7d2a83929e74","score":"0.74175113","text":"public function getAffectedRows() {\n\t\treturn $this->db->Affected_Rows();\n\t}","title":""},{"docid":"1c23eab0d1f79071cd72e2b88fdb2521","score":"0.7411107","text":"public function getAffectedRows() {\n \n switch ( $this->model ) {\n\n case (\"MYSQLI\"):\n \n $return = $this->handler->affected_rows;\n \n break;\n\n case (\"MYSQL_PDO\"):\n case (\"SQLITE_PDO\"):\n case (\"ORACLE_PDO\"):\n case (\"DBLIB_PDO\"):\n\n $return = $this->raw_data->rowCount();\n \n break;\n\n case (\"DB2\"):\n\n $return = db2_num_rows($this->raw_data);\n \n break;\n\n case (\"POSTGRESQL\"):\n\n $return = pg_affected_rows($this->raw_data);\n \n break;\n\n }\n\n return $return;\n \n }","title":""},{"docid":"6e3b3605f380e72dce76536dfaf0ddac","score":"0.73958236","text":"function AffectedRows(){\n return $this->Result->affected_rows;\n }","title":""},{"docid":"a940551e7fbe90895c8d73dc2abdd4ea","score":"0.73893374","text":"public function affectedRows()\n {\n return $this->_affectedRows;\n }","title":""},{"docid":"297da8a04aa12c51aa188b1452f4cd41","score":"0.7372757","text":"public function getAffectedRows() {\n\t\treturn mysql_affected_rows($this->db_link);\n\t}","title":""},{"docid":"56c8a7f4a8d8d00e6c7bd67bb97541cd","score":"0.7366646","text":"public function affectedRows()\n {\n return (int)$this->conn->affectedRows();\n }","title":""},{"docid":"df2db398007b87611549c1f2ff056c09","score":"0.73637444","text":"public function affectedRows():int{\r\n\t return $this->prepare?$this->prepare->affected_rows:0;\r\n\t}","title":""},{"docid":"ce24488ceb9c1e0a842d3605f86ca1f2","score":"0.7362269","text":"function affectedRows() \n\t{\n\t\treturn $this->affected_rows;\n\t}","title":""},{"docid":"04f99d459dd46abda7816714f40d272c","score":"0.7352685","text":"public function affectedRows() \n\t{\n try \n\t\t{\n $return = $this->result->rowCount();\n } \n\t\tcatch (\\PDOException $e) \n\t\t{\n $details = $e->errorInfo();\n $code = $e->getCode();\n\t\t\t$message = $e->getMessage();\n\t\t\t$message = 'affected Rows: ' . $code . ': ' . $message;\n $this->recordError($message);\n }\n return $return;\n }","title":""},{"docid":"f107971d7dd1b466c85ab06d5ac60242","score":"0.73513234","text":"public function getAffectedRows()\n\t{\n\t\t$this->connect();\n\n\t\treturn sqlsrv_rows_affected($this->cursor);\n\t}","title":""},{"docid":"3ac36473f195b2c8204f2a77380a8894","score":"0.7338583","text":"function db_affected_rows() {\n\treturn sasql_affected_rows($this->_dbh);\n\t}","title":""},{"docid":"41e89a11207b42dfd1d3d7fca6ae131d","score":"0.7330984","text":"function affectedRows(){\n\t\treturn odbc_num_rows($result);\n\t}","title":""},{"docid":"bad028f47b9cea11796a796e13f3c6ac","score":"0.7330517","text":"protected function affected_rows()\n\t{\n\t\treturn @pg_affected_rows($this->resResult);\n\t}","title":""},{"docid":"56b60f85c25bd19090fc83351a3981bf","score":"0.7322971","text":"public function affectedRows() {\n return $this->affectRows;\n }","title":""},{"docid":"117a8a909c3cca034b5ba12e7e399716","score":"0.73049617","text":"function get_affected_rows_count()\n\t{\n\t\treturn $this->affected_rows_count;\n\t}","title":""},{"docid":"c77d3682b6e3d937d2a6c0f7e789a9c7","score":"0.72665226","text":"public function affectedRows(){\n\n return mysql_affected_rows();\n\n }","title":""},{"docid":"2599a1379ef97b3a0c7d6d8e5cbf2788","score":"0.7243177","text":"public function getAffectedRows(){\n \treturn $this->_link !== null \n \t? mysqli_affected_rows($this->_link) : 0;\n }","title":""},{"docid":"e30c98eeefcae221cce4ee06ef1184af","score":"0.72163886","text":"public function getAffectedRows(){\r\n\t\treturn $this->wpdb->num_rows;\r\n\t}","title":""},{"docid":"a537ac88d820d1a56597f026fede64af","score":"0.720565","text":"public function affectedRows ()\n {\n return mysql_affected_rows($this->connection);\n }","title":""},{"docid":"cc5ee1d5ce872c9c4b35ad74ddc1d6da","score":"0.7199773","text":"function affected_rows()\n {\n return array();\n }","title":""},{"docid":"19f14fbb00612b465d4d37122e9df29f","score":"0.71920717","text":"public function affectedRows()\n\t\t{\n\t\t\t$retval = mysql_affected_rows($this->_conn);\n\n\t\t\tif (!is_numeric($retval)) {\n\t\t\t\t$this->_lasterror = mysql_error($this->_conn);\n\t\t\t\tself::throwException(__METHOD__, $this->_lasterror);\n\t\t\t}\n\n\t\t\treturn $retval;\n\t\t}","title":""},{"docid":"3a54485557cdaaa60cf9cda57544d951","score":"0.7183646","text":"public function rowsAfected() {\n return $this->_con->affected_rows;\n }","title":""},{"docid":"a1d295cb2e3a8a382870de3c3875319e","score":"0.7176019","text":"protected function _getAffectedRowCount()\n { \n return $this->m_stmt->affected_rows;\n }","title":""},{"docid":"7ccab4861a28aef62aaf4544cfc77a38","score":"0.71657246","text":"function affectedRows()\n {\n return mysql_affected_rows();\n }","title":""},{"docid":"7923bb661078c7cce84b3f03af2b1737","score":"0.7163513","text":"public function affectedRows() {\n\t\treturn $this->stmt->rowCount();\n\t}","title":""},{"docid":"9c08c43006b49a80df93e4821f8ab60c","score":"0.71598774","text":"public function GetAffectedRows() : int\n {\n return (int)mysqli_affected_rows($this->ConnectionId);\n }","title":""},{"docid":"e402da740d47583b5e7749e4434bd5a0","score":"0.7148382","text":"public function affected_rows() {\n return mysqli_affected_rows($this->connection);\n }","title":""},{"docid":"900d02416300112382d6fd70a166c64c","score":"0.7145055","text":"public function affected_rows() {\n return mysql_affected_rows($this->connection);\n }","title":""},{"docid":"e28ad6a2640c9e5c3244b17841fa1c23","score":"0.7142339","text":"public function affectedRows() {\n return mysql_affected_rows ( $this->conn );\n }","title":""},{"docid":"ae8525b640f8a65759f644c17320840a","score":"0.7131595","text":"function affected()\r\n {\r\n return $this->db->affectedRows();\r\n }","title":""},{"docid":"482e1181359ff82664b4b80da353b378","score":"0.7115067","text":"public static function affected_rows()\r\n {\r\n global $db;\r\n return mysql_affected_rows($db);\r\n }","title":""},{"docid":"f605c5001811d02e64f80aefec89f215","score":"0.71093464","text":"static function affectedRows(): int\n {\n return self::$mysqli->affected_rows;\n }","title":""},{"docid":"1089a4ae4c170fa2483bedf72fb77c38","score":"0.7090344","text":"public function Affected_Rows()\r\n {\r\n return $this->affected_rows;\r\n }","title":""},{"docid":"9375ad9072c13c555640968137246ab5","score":"0.7088104","text":"function affected_rows()\n\t{\n\t\treturn $this->link->affected_rows;\n\t}","title":""},{"docid":"0c48996b088d648534483a903f43b220","score":"0.70788956","text":"public function getAffectedRows()\n {\n return $this->mysqli !== null\n ? mysqli_affected_rows($this->mysqli) : 0;\n }","title":""},{"docid":"5ad03d092a1dde33ab6f9dcb05041cd4","score":"0.7056367","text":"public function affected()\n\t{\n\t\treturn mysql_affected_rows($this->_conn);\n\t}","title":""},{"docid":"df237357dac2082d16423254bfeca7b9","score":"0.70558566","text":"public static function affected() {\n\t\treturn @mysql_affected_rows(self::$link);\n\t}","title":""},{"docid":"9a8d2ee9cae2c7e88040d1f22774ba3d","score":"0.70548654","text":"public function affected_rows() {\n\t\treturn mysqli_affected_rows($this->connection);\n\t}","title":""},{"docid":"957c422b3fd9e041cff6012f02cdaf75","score":"0.70351976","text":"public function affectedRows()\n {\n return is_numeric($this->affectedRows) ? $this->affectedRows : false;\n }","title":""},{"docid":"bef3cf1e0aa882ed132b6c4a2c1d299d","score":"0.70239395","text":"public function getAffectedRows()\n\t{\n\t\tif ($this->cursor instanceof \\PDOStatement)\n\t\t{\n\t\t\treturn $this->cursor->rowCount();\n\t\t}\n\n\t\treturn 0;\n\t}","title":""},{"docid":"863fa760eca6fa48c9250385e00e7789","score":"0.70234585","text":"public function getAffectedRows($connection){}","title":""},{"docid":"5c26779759f1ae7aab5f86f3a24185fd","score":"0.70209724","text":"public function affectedRows()\n {\n return is_numeric($this->iAffectedRows) ? $this->iAffectedRows : false;\n }","title":""},{"docid":"e590c3d71f470b9d4817f6d6d492d099","score":"0.701539","text":"function affecte_db()\n\t\t{\n\t\t $tmp = mysql_affected_rows();\n\t\t return($tmp);\n\t\t}","title":""},{"docid":"6b574f320f161efd18a34f5a4412e9ea","score":"0.7005414","text":"final public function _affectedrows()\r\n\t{\r\n\t\t$result = @mysqli_affected_rows($this->_connectionID);\r\n\t\tif ($result == -1) {\r\n\t\t\tif ($this->debug) {\r\n\t\t\t\t$message = \"mysqli_affected_rows() failed : \" . $this->ErrorMsg();\r\n\t\t\t\t$this->connection->loggingObject->log(Logger::WARNING,$message);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $result;\r\n\t}","title":""},{"docid":"9a9e031c46a151a40cff13c22d4c75fc","score":"0.6998496","text":"public function AffectedRows() { return mysql_affected_rows($this->resource); }","title":""},{"docid":"7c3fb8ab8742786e315e3e25afabc8ee","score":"0.6982933","text":"public function affectedRows() {\n if (!$this->isConnected())\n return false;\n $ret = $this->result->rowCount();\n return $ret;\n }","title":""},{"docid":"46d4779a19065a6090c16c3c77c85848","score":"0.6963807","text":"public function affectedRows() {\r\n return mysql_affected_rows( $this->_link );\r\n }","title":""},{"docid":"966dd681c21ce8ece6725168b8807a81","score":"0.69595027","text":"public function affected_rows()\n {\n $this->affected_rows = mysql_affected_rows($this->link);\n return $this->affected_rows;\n }","title":""},{"docid":"ea4bd6dae562c35c2dcc50d96fcf0125","score":"0.6943935","text":"function dbNumRowsAffected();","title":""},{"docid":"6f3313ae851de9fdee8155a082ddfbbc","score":"0.6940125","text":"public function getCountAffectedRows(){\n\t\treturn $this->conn->affected_rows;\n\t}","title":""},{"docid":"00917d90ef56e59f22c0fb0d83902ee4","score":"0.6927833","text":"function Affected_Rows()\r\n\t{\r\n\t\tif (EW_USE_MYSQLI) {\r\n\t\t\treturn @mysqli_affected_rows($this->connectionId);\r\n\t\t} else {\r\n\t\t\treturn @mysql_affected_rows($this->connectionId);\r\n\t\t}\r\n\t}","title":""},{"docid":"2084da31bb8df499dd257c04b903ad1e","score":"0.69267124","text":"public function affectedRows()\n\t{\n\t\treturn mysqli_affected_rows ($this->conn);\n\t}","title":""},{"docid":"06792e6acf4b8369acfed4722122b71d","score":"0.69204473","text":"function bb2_db_affected_rows() {\n\treturn @mysql_affected_rows(database()->connection());\n}","title":""},{"docid":"e3a45483b42265e73cd82d2835659f56","score":"0.69121647","text":"public function affectedRows() {\n return @mysqli_affected_rows($this->link);\n }","title":""},{"docid":"cf0d758872ee66038c8fc795d6c6d6ef","score":"0.6901351","text":"public function getAffect() {\n\n return pg_affected_rows($this->consulta);\n \n }","title":""},{"docid":"d13999ca497eee6673eeff049e6cc546","score":"0.68913895","text":"public function affectedRows()\n\t{\n\t\tif ($this->stmt == null)\n\t\treturn 0;\n\n\t\treturn $this->stmt->rowCount();\n\t}","title":""},{"docid":"fd3cb05bac6d5992071d4cc325bc0b53","score":"0.6860522","text":"public function getAffected()\n {\n return $this->affected;\n }","title":""},{"docid":"942b7701c719a15fc0e9337873c83e2b","score":"0.68382347","text":"public function AffectedRows() {\n\n return $this->\n connection->\n affected_rows;\n }","title":""},{"docid":"b2786ffa7dc287682d16dd41cbb73f5c","score":"0.6818815","text":"private function AffectedRows() {\n return mysql_affected_rows($this->connection);\n }","title":""},{"docid":"bce64c594e1284f4e903948b8bf4d00b","score":"0.68105954","text":"public function affected() {\n\t\treturn $this->link->affected_rows;\n\t}","title":""},{"docid":"9d047c0033c27c27f36859d34afa080a","score":"0.6806089","text":"function qa_db_affected_rows()\n{\n\t$db = qa_db_connection();\n\treturn $db->affected_rows;\n}","title":""},{"docid":"cafe4c7614310871de8c296d8450a697","score":"0.68025136","text":"public function countAffectedRows() {\n $result = mysql_affected_rows($this->connection);\n if ($result === -1) {\n throw new DBException(\"query affectedRows failed;\\n\");\n } else {\n return $result;\n }\n }","title":""},{"docid":"3fc176eb2824a3d8cf829057e0a87932","score":"0.6787114","text":"function numAffected()\n {\n return $this->dbInstance->affected_rows();\n }","title":""},{"docid":"9cb4de4dcb6cbbddcb93ede1009bd553","score":"0.6772098","text":"public function getAffectedRowCount()\n\t{\n\t\treturn mysql_affected_rows($this->dbLink);\n\t}","title":""},{"docid":"28235dec1971955b12d8865df9ce54b0","score":"0.6758677","text":"public function affected_rows()\n\t{\n\t\t$affected_rows = mysql_affected_rows($this->dbpointer);\n\t\tif($affected_rows < 0) { $affected_rows = 0; }\n\t\treturn $affected_rows;\n\t}","title":""},{"docid":"091b3d624715fc79b6cb4096461db149","score":"0.66181654","text":"function pdo_affected_rows($res) {\r\n return ($res===false || is_int($res)) ? $res : $res->rowCount();\r\n}","title":""},{"docid":"dbab3f36709c0166d32158773c23dba9","score":"0.65965307","text":"protected function getAffectedRowsCountImpl(): int\n {\n return $this->affRows;\n }","title":""},{"docid":"0602960c3be1d5db6aee3fc2a3261abc","score":"0.65870905","text":"function affectedRows($res = null)\n {\n if ($res == null) {\n $res = $this->res;\n }\n if (!$res) {\n return false;\n }\n return mysql_affected_rows($this->dbCon);\n }","title":""},{"docid":"d4be02e9410a3ede058105adb80ac7c8","score":"0.6575021","text":"function DB_AffectedRows($result) {\n\t$affected_rows = mysqli_affected_rows($result);\n\treturn $affected_rows;\n}","title":""},{"docid":"0a3696ef88695f1f5c25f3c4ea4a0777","score":"0.654828","text":"public function affectedRows()\n {\n $affectedRows = $this->conn->affected_rows;\n\n if($affectedRows > 0) {\n return $affectedRows;\n } else {\n return false;\n }\n }","title":""},{"docid":"3160fbe71fd4522918b30c97c9c9d104","score":"0.65383023","text":"public function testAffectedRowsReturnsNumber(): void\n {\n $this->set_reflection_property_value('affected_rows', 10);\n\n $value = $this->class->affected_rows();\n $this->assertIsInt($value);\n $this->assertEquals(10, $value);\n }","title":""},{"docid":"fb7e60011f4717a2033a9208e06bad5d","score":"0.652962","text":"public function getAffectedRows()\n {\n if ($this->querySucceeded()) {\n // Retrieves the number of rows from a result set. This command is only valid\n // for statements like SELECT or SHOW that return an actual result set.\n if (($this->queryType == 'SELECT') || ($this->queryType == 'SHOW')) {\n return mysql_num_rows($this->queryResult);\n } else {\n // To retrieve the number of rows affected by a INSERT, UPDATE,\n // REPLACE or DELETE query, use mysql_affected_rows().\n return mysql_affected_rows();\n }\n } else {\n return 0;\n }\n }","title":""},{"docid":"4b2484d552186f7a82f687c23ac03734","score":"0.65179324","text":"function AffectedRows()\n {\n return (@mysqli_affected_rows($this->conn));\n\t}","title":""},{"docid":"588bd861c48d68fd29ee8fc4d7b72755","score":"0.6511441","text":"public function affectedRows()\n {\n if (!$this->statement) {\n throw new DriverException('Result instance missing');\n }\n\n return $this->statement->rowCount();\n }","title":""},{"docid":"2cacc1641c80ff5dc6f69ea374b2b751","score":"0.643315","text":"function affected_rows() {\n\t return @mysql_affected_rows($this->Link_ID);\n\t}","title":""}],"string":"[\n {\n \"docid\": \"04039feff877134f194e2215c4a57e50\",\n \"score\": \"0.7991181\",\n \"text\": \"function lastAffected ()\\n {\\n return $this->_adodb->Affected_Rows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1103b963067a264df9c818559c83f06\",\n \"score\": \"0.7979652\",\n \"text\": \"public function lastAffected()\\n {\\n if ($this->_result) {\\n return mssql_rows_affected($this->connection);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57457aebfc7bec328c55be9c6913e047\",\n \"score\": \"0.7930536\",\n \"text\": \"public function getAffectedRows()\\n {\\n return $this->rowsAffected;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f083eb32c5374e3d5dc4501022c6938a\",\n \"score\": \"0.7904414\",\n \"text\": \"protected function getRowsAffected() {\\n return $this->rowsAffected;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ac1b020e50508a382a161b043fffc3c\",\n \"score\": \"0.7882673\",\n \"text\": \"public function getRowsAffected()\\n {\\n return $this->rowsAffected;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7853e3183c912ec71a694bd8a3c073e7\",\n \"score\": \"0.77958965\",\n \"text\": \"public function getAffectedRows() {\\r\\n\\t\\treturn $this->_affectedRows;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2fb6173d7a950c2c9a2284c746cc0a7\",\n \"score\": \"0.7792423\",\n \"text\": \"public function getAffectedRows()\\n\\t{\\n\\t\\treturn $this->affectedRows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2fb6173d7a950c2c9a2284c746cc0a7\",\n \"score\": \"0.7792423\",\n \"text\": \"public function getAffectedRows()\\n\\t{\\n\\t\\treturn $this->affectedRows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebd89d6d95c4bf50c13a4579c7b09db9\",\n \"score\": \"0.77696294\",\n \"text\": \"function getAffectedRows() {\\r\\n\\t\\t\\t$result = mysql_affected_rows();\\r\\n\\t\\t\\treturn $result;\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"797b0949df222110dc66e41ad5e7e12a\",\n \"score\": \"0.7707714\",\n \"text\": \"public function GetAffectedRows() {\\n return $this->affectedRows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5bbf4e7217e0c299439a4d5d5624e45\",\n \"score\": \"0.7653732\",\n \"text\": \"function getAffectedRows()\\n\\t{\\n\\t\\treturn mysql_affected_rows($this->conn);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17ad1929413285e2f3976dfbf21d5838\",\n \"score\": \"0.7638587\",\n \"text\": \"public function affectedRows() {\\n\\t\\treturn $this->last->affected_rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"941fcb39f84c2d84e735b38a55be4d8f\",\n \"score\": \"0.7635769\",\n \"text\": \"public function affected_rows(){\\n\\t\\n\\treturn $this->sql_affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d47e91735c476814e4668c0136ad5bd\",\n \"score\": \"0.7604929\",\n \"text\": \"public function getAffectedRows()\\n {\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd8e31ad93c6cdcd706592993826538b\",\n \"score\": \"0.7557321\",\n \"text\": \"public function getAffectedRows()\\n {\\n if (!is_object($this->lastResult)) {\\n return null;\\n }\\n return $this->lastResult->rowCount();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da576a5307cdc2bfdade90e0c99e088a\",\n \"score\": \"0.7531629\",\n \"text\": \"public function getAffectedRows(): int\\n {\\n return $this->affectedRows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7cbca3279bb7cc246fe0c7be78e4e51d\",\n \"score\": \"0.7517561\",\n \"text\": \"public function affectedRows();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7cbca3279bb7cc246fe0c7be78e4e51d\",\n \"score\": \"0.7517561\",\n \"text\": \"public function affectedRows();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b1fadbbb33f91639fc9bde632927d19\",\n \"score\": \"0.7503291\",\n \"text\": \"public function getAffectedRows() {\\r\\n\\t\\r\\n\\t\\treturn self::$mysqli->affected_rows;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94366badac3b7fffed95254717a6aeba\",\n \"score\": \"0.750141\",\n \"text\": \"public function affectedRows()/*# : int */;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2810383d808aff4c420a586270ba149\",\n \"score\": \"0.7493551\",\n \"text\": \"public function affectedRows()\\n{\\n\\treturn $this->connections[$this->activeConnection]->affected_rows;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdbbe32fd4e073638d4b5579505e21ad\",\n \"score\": \"0.74867404\",\n \"text\": \"public function getAffectedRows()\\n\\t{\\n\\t\\t$this->connect();\\n\\t\\tif (isset($this->C->affected_rows)) {\\n\\t\\t\\treturn $this->C->affected_rows;\\n\\t\\t}\\n\\t\\treturn 0;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d11c5b910fe80b42598a4bd12418550\",\n \"score\": \"0.74677676\",\n \"text\": \"function affected_rows() {\\n switch($this->_type) {\\n case $this->DB_MYSQL:\\n return mysql_affected_rows($this->handle);\\n break;\\n\\n default:\\n return NULL;\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"628b2b60bb78f32be7526cdba8bb7d97\",\n \"score\": \"0.7447595\",\n \"text\": \"public function getAffectedRows()\\n {\\n return mysql_affected_rows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"691f88f5d27853aa1d5c887b108b67ee\",\n \"score\": \"0.74319947\",\n \"text\": \"public function affected_rows()\\n {\\n $this->connect();\\n $num = $this->connection->Affected_Rows();\\n if( self::$debug ) log::debug( '(DB) affected rows = '.$num );\\n return $num;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21af411376cf5979baea7d2a83929e74\",\n \"score\": \"0.74175113\",\n \"text\": \"public function getAffectedRows() {\\n\\t\\treturn $this->db->Affected_Rows();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c23eab0d1f79071cd72e2b88fdb2521\",\n \"score\": \"0.7411107\",\n \"text\": \"public function getAffectedRows() {\\n \\n switch ( $this->model ) {\\n\\n case (\\\"MYSQLI\\\"):\\n \\n $return = $this->handler->affected_rows;\\n \\n break;\\n\\n case (\\\"MYSQL_PDO\\\"):\\n case (\\\"SQLITE_PDO\\\"):\\n case (\\\"ORACLE_PDO\\\"):\\n case (\\\"DBLIB_PDO\\\"):\\n\\n $return = $this->raw_data->rowCount();\\n \\n break;\\n\\n case (\\\"DB2\\\"):\\n\\n $return = db2_num_rows($this->raw_data);\\n \\n break;\\n\\n case (\\\"POSTGRESQL\\\"):\\n\\n $return = pg_affected_rows($this->raw_data);\\n \\n break;\\n\\n }\\n\\n return $return;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e3b3605f380e72dce76536dfaf0ddac\",\n \"score\": \"0.73958236\",\n \"text\": \"function AffectedRows(){\\n return $this->Result->affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a940551e7fbe90895c8d73dc2abdd4ea\",\n \"score\": \"0.73893374\",\n \"text\": \"public function affectedRows()\\n {\\n return $this->_affectedRows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"297da8a04aa12c51aa188b1452f4cd41\",\n \"score\": \"0.7372757\",\n \"text\": \"public function getAffectedRows() {\\n\\t\\treturn mysql_affected_rows($this->db_link);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56c8a7f4a8d8d00e6c7bd67bb97541cd\",\n \"score\": \"0.7366646\",\n \"text\": \"public function affectedRows()\\n {\\n return (int)$this->conn->affectedRows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df2db398007b87611549c1f2ff056c09\",\n \"score\": \"0.73637444\",\n \"text\": \"public function affectedRows():int{\\r\\n\\t return $this->prepare?$this->prepare->affected_rows:0;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce24488ceb9c1e0a842d3605f86ca1f2\",\n \"score\": \"0.7362269\",\n \"text\": \"function affectedRows() \\n\\t{\\n\\t\\treturn $this->affected_rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04f99d459dd46abda7816714f40d272c\",\n \"score\": \"0.7352685\",\n \"text\": \"public function affectedRows() \\n\\t{\\n try \\n\\t\\t{\\n $return = $this->result->rowCount();\\n } \\n\\t\\tcatch (\\\\PDOException $e) \\n\\t\\t{\\n $details = $e->errorInfo();\\n $code = $e->getCode();\\n\\t\\t\\t$message = $e->getMessage();\\n\\t\\t\\t$message = 'affected Rows: ' . $code . ': ' . $message;\\n $this->recordError($message);\\n }\\n return $return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f107971d7dd1b466c85ab06d5ac60242\",\n \"score\": \"0.73513234\",\n \"text\": \"public function getAffectedRows()\\n\\t{\\n\\t\\t$this->connect();\\n\\n\\t\\treturn sqlsrv_rows_affected($this->cursor);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ac36473f195b2c8204f2a77380a8894\",\n \"score\": \"0.7338583\",\n \"text\": \"function db_affected_rows() {\\n\\treturn sasql_affected_rows($this->_dbh);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41e89a11207b42dfd1d3d7fca6ae131d\",\n \"score\": \"0.7330984\",\n \"text\": \"function affectedRows(){\\n\\t\\treturn odbc_num_rows($result);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bad028f47b9cea11796a796e13f3c6ac\",\n \"score\": \"0.7330517\",\n \"text\": \"protected function affected_rows()\\n\\t{\\n\\t\\treturn @pg_affected_rows($this->resResult);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56b60f85c25bd19090fc83351a3981bf\",\n \"score\": \"0.7322971\",\n \"text\": \"public function affectedRows() {\\n return $this->affectRows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"117a8a909c3cca034b5ba12e7e399716\",\n \"score\": \"0.73049617\",\n \"text\": \"function get_affected_rows_count()\\n\\t{\\n\\t\\treturn $this->affected_rows_count;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c77d3682b6e3d937d2a6c0f7e789a9c7\",\n \"score\": \"0.72665226\",\n \"text\": \"public function affectedRows(){\\n\\n return mysql_affected_rows();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2599a1379ef97b3a0c7d6d8e5cbf2788\",\n \"score\": \"0.7243177\",\n \"text\": \"public function getAffectedRows(){\\n \\treturn $this->_link !== null \\n \\t? mysqli_affected_rows($this->_link) : 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e30c98eeefcae221cce4ee06ef1184af\",\n \"score\": \"0.72163886\",\n \"text\": \"public function getAffectedRows(){\\r\\n\\t\\treturn $this->wpdb->num_rows;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a537ac88d820d1a56597f026fede64af\",\n \"score\": \"0.720565\",\n \"text\": \"public function affectedRows ()\\n {\\n return mysql_affected_rows($this->connection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc5ee1d5ce872c9c4b35ad74ddc1d6da\",\n \"score\": \"0.7199773\",\n \"text\": \"function affected_rows()\\n {\\n return array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f14fbb00612b465d4d37122e9df29f\",\n \"score\": \"0.71920717\",\n \"text\": \"public function affectedRows()\\n\\t\\t{\\n\\t\\t\\t$retval = mysql_affected_rows($this->_conn);\\n\\n\\t\\t\\tif (!is_numeric($retval)) {\\n\\t\\t\\t\\t$this->_lasterror = mysql_error($this->_conn);\\n\\t\\t\\t\\tself::throwException(__METHOD__, $this->_lasterror);\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn $retval;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a54485557cdaaa60cf9cda57544d951\",\n \"score\": \"0.7183646\",\n \"text\": \"public function rowsAfected() {\\n return $this->_con->affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1d295cb2e3a8a382870de3c3875319e\",\n \"score\": \"0.7176019\",\n \"text\": \"protected function _getAffectedRowCount()\\n { \\n return $this->m_stmt->affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ccab4861a28aef62aaf4544cfc77a38\",\n \"score\": \"0.71657246\",\n \"text\": \"function affectedRows()\\n {\\n return mysql_affected_rows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7923bb661078c7cce84b3f03af2b1737\",\n \"score\": \"0.7163513\",\n \"text\": \"public function affectedRows() {\\n\\t\\treturn $this->stmt->rowCount();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c08c43006b49a80df93e4821f8ab60c\",\n \"score\": \"0.71598774\",\n \"text\": \"public function GetAffectedRows() : int\\n {\\n return (int)mysqli_affected_rows($this->ConnectionId);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e402da740d47583b5e7749e4434bd5a0\",\n \"score\": \"0.7148382\",\n \"text\": \"public function affected_rows() {\\n return mysqli_affected_rows($this->connection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"900d02416300112382d6fd70a166c64c\",\n \"score\": \"0.7145055\",\n \"text\": \"public function affected_rows() {\\n return mysql_affected_rows($this->connection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e28ad6a2640c9e5c3244b17841fa1c23\",\n \"score\": \"0.7142339\",\n \"text\": \"public function affectedRows() {\\n return mysql_affected_rows ( $this->conn );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae8525b640f8a65759f644c17320840a\",\n \"score\": \"0.7131595\",\n \"text\": \"function affected()\\r\\n {\\r\\n return $this->db->affectedRows();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"482e1181359ff82664b4b80da353b378\",\n \"score\": \"0.7115067\",\n \"text\": \"public static function affected_rows()\\r\\n {\\r\\n global $db;\\r\\n return mysql_affected_rows($db);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f605c5001811d02e64f80aefec89f215\",\n \"score\": \"0.71093464\",\n \"text\": \"static function affectedRows(): int\\n {\\n return self::$mysqli->affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1089a4ae4c170fa2483bedf72fb77c38\",\n \"score\": \"0.7090344\",\n \"text\": \"public function Affected_Rows()\\r\\n {\\r\\n return $this->affected_rows;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9375ad9072c13c555640968137246ab5\",\n \"score\": \"0.7088104\",\n \"text\": \"function affected_rows()\\n\\t{\\n\\t\\treturn $this->link->affected_rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c48996b088d648534483a903f43b220\",\n \"score\": \"0.70788956\",\n \"text\": \"public function getAffectedRows()\\n {\\n return $this->mysqli !== null\\n ? mysqli_affected_rows($this->mysqli) : 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ad03d092a1dde33ab6f9dcb05041cd4\",\n \"score\": \"0.7056367\",\n \"text\": \"public function affected()\\n\\t{\\n\\t\\treturn mysql_affected_rows($this->_conn);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df237357dac2082d16423254bfeca7b9\",\n \"score\": \"0.70558566\",\n \"text\": \"public static function affected() {\\n\\t\\treturn @mysql_affected_rows(self::$link);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a8d2ee9cae2c7e88040d1f22774ba3d\",\n \"score\": \"0.70548654\",\n \"text\": \"public function affected_rows() {\\n\\t\\treturn mysqli_affected_rows($this->connection);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"957c422b3fd9e041cff6012f02cdaf75\",\n \"score\": \"0.70351976\",\n \"text\": \"public function affectedRows()\\n {\\n return is_numeric($this->affectedRows) ? $this->affectedRows : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bef3cf1e0aa882ed132b6c4a2c1d299d\",\n \"score\": \"0.70239395\",\n \"text\": \"public function getAffectedRows()\\n\\t{\\n\\t\\tif ($this->cursor instanceof \\\\PDOStatement)\\n\\t\\t{\\n\\t\\t\\treturn $this->cursor->rowCount();\\n\\t\\t}\\n\\n\\t\\treturn 0;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"863fa760eca6fa48c9250385e00e7789\",\n \"score\": \"0.70234585\",\n \"text\": \"public function getAffectedRows($connection){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c26779759f1ae7aab5f86f3a24185fd\",\n \"score\": \"0.70209724\",\n \"text\": \"public function affectedRows()\\n {\\n return is_numeric($this->iAffectedRows) ? $this->iAffectedRows : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e590c3d71f470b9d4817f6d6d492d099\",\n \"score\": \"0.701539\",\n \"text\": \"function affecte_db()\\n\\t\\t{\\n\\t\\t $tmp = mysql_affected_rows();\\n\\t\\t return($tmp);\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b574f320f161efd18a34f5a4412e9ea\",\n \"score\": \"0.7005414\",\n \"text\": \"final public function _affectedrows()\\r\\n\\t{\\r\\n\\t\\t$result = @mysqli_affected_rows($this->_connectionID);\\r\\n\\t\\tif ($result == -1) {\\r\\n\\t\\t\\tif ($this->debug) {\\r\\n\\t\\t\\t\\t$message = \\\"mysqli_affected_rows() failed : \\\" . $this->ErrorMsg();\\r\\n\\t\\t\\t\\t$this->connection->loggingObject->log(Logger::WARNING,$message);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $result;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a9e031c46a151a40cff13c22d4c75fc\",\n \"score\": \"0.6998496\",\n \"text\": \"public function AffectedRows() { return mysql_affected_rows($this->resource); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c3fb8ab8742786e315e3e25afabc8ee\",\n \"score\": \"0.6982933\",\n \"text\": \"public function affectedRows() {\\n if (!$this->isConnected())\\n return false;\\n $ret = $this->result->rowCount();\\n return $ret;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46d4779a19065a6090c16c3c77c85848\",\n \"score\": \"0.6963807\",\n \"text\": \"public function affectedRows() {\\r\\n return mysql_affected_rows( $this->_link );\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"966dd681c21ce8ece6725168b8807a81\",\n \"score\": \"0.69595027\",\n \"text\": \"public function affected_rows()\\n {\\n $this->affected_rows = mysql_affected_rows($this->link);\\n return $this->affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea4bd6dae562c35c2dcc50d96fcf0125\",\n \"score\": \"0.6943935\",\n \"text\": \"function dbNumRowsAffected();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f3313ae851de9fdee8155a082ddfbbc\",\n \"score\": \"0.6940125\",\n \"text\": \"public function getCountAffectedRows(){\\n\\t\\treturn $this->conn->affected_rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00917d90ef56e59f22c0fb0d83902ee4\",\n \"score\": \"0.6927833\",\n \"text\": \"function Affected_Rows()\\r\\n\\t{\\r\\n\\t\\tif (EW_USE_MYSQLI) {\\r\\n\\t\\t\\treturn @mysqli_affected_rows($this->connectionId);\\r\\n\\t\\t} else {\\r\\n\\t\\t\\treturn @mysql_affected_rows($this->connectionId);\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2084da31bb8df499dd257c04b903ad1e\",\n \"score\": \"0.69267124\",\n \"text\": \"public function affectedRows()\\n\\t{\\n\\t\\treturn mysqli_affected_rows ($this->conn);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06792e6acf4b8369acfed4722122b71d\",\n \"score\": \"0.69204473\",\n \"text\": \"function bb2_db_affected_rows() {\\n\\treturn @mysql_affected_rows(database()->connection());\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3a45483b42265e73cd82d2835659f56\",\n \"score\": \"0.69121647\",\n \"text\": \"public function affectedRows() {\\n return @mysqli_affected_rows($this->link);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf0d758872ee66038c8fc795d6c6d6ef\",\n \"score\": \"0.6901351\",\n \"text\": \"public function getAffect() {\\n\\n return pg_affected_rows($this->consulta);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d13999ca497eee6673eeff049e6cc546\",\n \"score\": \"0.68913895\",\n \"text\": \"public function affectedRows()\\n\\t{\\n\\t\\tif ($this->stmt == null)\\n\\t\\treturn 0;\\n\\n\\t\\treturn $this->stmt->rowCount();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd3cb05bac6d5992071d4cc325bc0b53\",\n \"score\": \"0.6860522\",\n \"text\": \"public function getAffected()\\n {\\n return $this->affected;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"942b7701c719a15fc0e9337873c83e2b\",\n \"score\": \"0.68382347\",\n \"text\": \"public function AffectedRows() {\\n\\n return $this->\\n connection->\\n affected_rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2786ffa7dc287682d16dd41cbb73f5c\",\n \"score\": \"0.6818815\",\n \"text\": \"private function AffectedRows() {\\n return mysql_affected_rows($this->connection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bce64c594e1284f4e903948b8bf4d00b\",\n \"score\": \"0.68105954\",\n \"text\": \"public function affected() {\\n\\t\\treturn $this->link->affected_rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d047c0033c27c27f36859d34afa080a\",\n \"score\": \"0.6806089\",\n \"text\": \"function qa_db_affected_rows()\\n{\\n\\t$db = qa_db_connection();\\n\\treturn $db->affected_rows;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cafe4c7614310871de8c296d8450a697\",\n \"score\": \"0.68025136\",\n \"text\": \"public function countAffectedRows() {\\n $result = mysql_affected_rows($this->connection);\\n if ($result === -1) {\\n throw new DBException(\\\"query affectedRows failed;\\\\n\\\");\\n } else {\\n return $result;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fc176eb2824a3d8cf829057e0a87932\",\n \"score\": \"0.6787114\",\n \"text\": \"function numAffected()\\n {\\n return $this->dbInstance->affected_rows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cb4de4dcb6cbbddcb93ede1009bd553\",\n \"score\": \"0.6772098\",\n \"text\": \"public function getAffectedRowCount()\\n\\t{\\n\\t\\treturn mysql_affected_rows($this->dbLink);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28235dec1971955b12d8865df9ce54b0\",\n \"score\": \"0.6758677\",\n \"text\": \"public function affected_rows()\\n\\t{\\n\\t\\t$affected_rows = mysql_affected_rows($this->dbpointer);\\n\\t\\tif($affected_rows < 0) { $affected_rows = 0; }\\n\\t\\treturn $affected_rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"091b3d624715fc79b6cb4096461db149\",\n \"score\": \"0.66181654\",\n \"text\": \"function pdo_affected_rows($res) {\\r\\n return ($res===false || is_int($res)) ? $res : $res->rowCount();\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbab3f36709c0166d32158773c23dba9\",\n \"score\": \"0.65965307\",\n \"text\": \"protected function getAffectedRowsCountImpl(): int\\n {\\n return $this->affRows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0602960c3be1d5db6aee3fc2a3261abc\",\n \"score\": \"0.65870905\",\n \"text\": \"function affectedRows($res = null)\\n {\\n if ($res == null) {\\n $res = $this->res;\\n }\\n if (!$res) {\\n return false;\\n }\\n return mysql_affected_rows($this->dbCon);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4be02e9410a3ede058105adb80ac7c8\",\n \"score\": \"0.6575021\",\n \"text\": \"function DB_AffectedRows($result) {\\n\\t$affected_rows = mysqli_affected_rows($result);\\n\\treturn $affected_rows;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a3696ef88695f1f5c25f3c4ea4a0777\",\n \"score\": \"0.654828\",\n \"text\": \"public function affectedRows()\\n {\\n $affectedRows = $this->conn->affected_rows;\\n\\n if($affectedRows > 0) {\\n return $affectedRows;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3160fbe71fd4522918b30c97c9c9d104\",\n \"score\": \"0.65383023\",\n \"text\": \"public function testAffectedRowsReturnsNumber(): void\\n {\\n $this->set_reflection_property_value('affected_rows', 10);\\n\\n $value = $this->class->affected_rows();\\n $this->assertIsInt($value);\\n $this->assertEquals(10, $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb7e60011f4717a2033a9208e06bad5d\",\n \"score\": \"0.652962\",\n \"text\": \"public function getAffectedRows()\\n {\\n if ($this->querySucceeded()) {\\n // Retrieves the number of rows from a result set. This command is only valid\\n // for statements like SELECT or SHOW that return an actual result set.\\n if (($this->queryType == 'SELECT') || ($this->queryType == 'SHOW')) {\\n return mysql_num_rows($this->queryResult);\\n } else {\\n // To retrieve the number of rows affected by a INSERT, UPDATE,\\n // REPLACE or DELETE query, use mysql_affected_rows().\\n return mysql_affected_rows();\\n }\\n } else {\\n return 0;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b2484d552186f7a82f687c23ac03734\",\n \"score\": \"0.65179324\",\n \"text\": \"function AffectedRows()\\n {\\n return (@mysqli_affected_rows($this->conn));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"588bd861c48d68fd29ee8fc4d7b72755\",\n \"score\": \"0.6511441\",\n \"text\": \"public function affectedRows()\\n {\\n if (!$this->statement) {\\n throw new DriverException('Result instance missing');\\n }\\n\\n return $this->statement->rowCount();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cacc1641c80ff5dc6f69ea374b2b751\",\n \"score\": \"0.643315\",\n \"text\": \"function affected_rows() {\\n\\t return @mysql_affected_rows($this->Link_ID);\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":578,"cells":{"query_id":{"kind":"string","value":"be1b4cf341baa803be8e27dd434ef2da"},"query":{"kind":"string","value":"Return element the iterator points to."},"positive_passages":{"kind":"list like","value":[{"docid":"2024bf49fb1036374b9a84d248e9c144","score":"0.0","text":"function ¤t ()\n {\n abstract::call_pure_virtual ('current');\n }","title":""}],"string":"[\n {\n \"docid\": \"2024bf49fb1036374b9a84d248e9c144\",\n \"score\": \"0.0\",\n \"text\": \"function ¤t ()\\n {\\n abstract::call_pure_virtual ('current');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"6b0de8369e254089e392fc63887e6c4a","score":"0.7771353","text":"private function getCurrentElement()\n {\n return $this->iteratorCacheIterator->current();\n }","title":""},{"docid":"8b889b834a29ddf997c2bd4758e2c8f1","score":"0.7652126","text":"public function current()\n\t{\n\t\treturn $this->iterators->current()->current();\n\t}","title":""},{"docid":"60658e795f0411c39eb394341d113987","score":"0.7552457","text":"public function current()\n\t{\n\t\t$this->initializeIterator();\n\t\treturn $this->iterator->current();\n\t}","title":""},{"docid":"0f33dc07ecb5f501f34f63832e24ab43","score":"0.75313425","text":"public function current()\n {\n if ($this->currentIndex >= $this->length) {\n throw new IndexOutOfRangeException(sprintf('Index %d out of range', $this->currentIndex), 1410183473);\n }\n if (!isset($this->elements[$this->currentIndex])) {\n return null;\n }\n\n return $this->elements[$this->currentIndex];\n }","title":""},{"docid":"5dee362456bab7f5ada12748ddf85317","score":"0.7528658","text":"function current()\n {\n return $this->_cache[$this->_iterator_position];\n }","title":""},{"docid":"8a91759cb38c32b764e4e380badd7933","score":"0.75247645","text":"public function current()\n {\n $this->resetIterator();\n return $this->iterator->current();\n }","title":""},{"docid":"2fa1962728571b43c91a34f00867cfec","score":"0.74886924","text":"public function current() {\n return $this->iterator->current();\n }","title":""},{"docid":"c893502c94027f68a521e41a9e1713c1","score":"0.74760836","text":"public function current()\n {\n return $this->itemAt($this->ptr);\n }","title":""},{"docid":"63138d3ba5290b5dc7d93833e0234df9","score":"0.7423226","text":"public function current()\n {\n return current($this->elements);\n }","title":""},{"docid":"63138d3ba5290b5dc7d93833e0234df9","score":"0.7423226","text":"public function current()\n {\n return current($this->elements);\n }","title":""},{"docid":"7a46698ba13defbf6831a844e7a79544","score":"0.74085414","text":"public function current()\n {\n return $this->getInnerIterator()->current();\n }","title":""},{"docid":"10b47d44ec6e0b7772d5ff640c66a9eb","score":"0.74008703","text":"public function get()\n {\n $current = $this->current();\n $this->next();\n return $current;\n }","title":""},{"docid":"d77e574fa19270be4c9f5731e0bb08d2","score":"0.73975086","text":"public function current()\n {\n return $this->values[$this->iterpos];\n }","title":""},{"docid":"087007929f4df0b019068755cdc7890d","score":"0.7361074","text":"public function current()\n {\n return $this->collection[$this->pointer];\n }","title":""},{"docid":"f9cfc1dbe0dc3b2013ff0f48bb4faef9","score":"0.7336792","text":"public function current() {\n\t\treturn $this->at( $this->position );\n\t}","title":""},{"docid":"7919ffcd0029430d0877d2c14b8467b0","score":"0.73209965","text":"public function current()\n {\n $this->skipNextIteration = false;\n return \\current($this->data);\n }","title":""},{"docid":"a4c4462a281c7af3e8bf93feee4ae411","score":"0.7305018","text":"public function next()\n {\n return $this->iterator->next();\n }","title":""},{"docid":"3499a2ada645e397e7bcb44fa4109b66","score":"0.7276862","text":"public function current()\n {\n return $this->items[$this->pos];\n }","title":""},{"docid":"de4eb424d139d582629b8e71b8987a9c","score":"0.72564596","text":"public function current()\n {\n return $this->_collection[$this->_pos];\n }","title":""},{"docid":"76dfc2f1aeed102d59b9c9d8942de9db","score":"0.7249776","text":"public function current() {\n $k = $this->keys[$this->currentIndex];\n return $this->items[$k];\n }","title":""},{"docid":"e50fa98f86edfc3709944a913fab9a39","score":"0.7243198","text":"public function current()\n\t{\n\t\treturn $this->item( $this->position );\n\t}","title":""},{"docid":"38c7606499f4dccb12163064555b2280","score":"0.72347337","text":"public function current()\n {\n return $this->items[$this->cursor];\n }","title":""},{"docid":"eee6510d249a4bd8f4d125122b6a2a6c","score":"0.7220048","text":"public function current()\n\t{\n\t\treturn $this->_values[ $this->_i ];\n\t}","title":""},{"docid":"e8177c30f3304c8aca16387ee9a09aa2","score":"0.72057456","text":"public function getOne()\n {\n if ($this->count() > 0)\n {\n $this->seek(0);\n return $this->current();\n } else\n return null;\n }","title":""},{"docid":"78294d27f28c79901a4fcd7ebb21ab7d","score":"0.7205004","text":"public function current()\n {\n return $this->offsetGet($this->key());\n }","title":""},{"docid":"d111690d6375b03cd4fb94f7c94c7875","score":"0.7202218","text":"function current()\n {\n return $this->items[$this->position];\n }","title":""},{"docid":"44e30b9ec13df9ad10fb3ba66b0c3392","score":"0.71940273","text":"public function current()\n {\n return $this->_items[$this->_key];\n }","title":""},{"docid":"1ef24d4c56b04f54a771d1ba1b535a7b","score":"0.71863437","text":"public function current()\n\t{\n\t\treturn $this->_values[$this->_idx];\n\t}","title":""},{"docid":"2c7de91ea179e624d4fe19de08557aa0","score":"0.71655685","text":"public function current()\n {\n return $this->items[$this->keys[$this->index]];\n }","title":""},{"docid":"36764726db25bedbabc0e39f58e9261b","score":"0.71618205","text":"public function current()\n {\n return $this->items[ $this->pointerCurrent ];\n }","title":""},{"docid":"8fc9bf557c9df91d4325f6cf372d4fdd","score":"0.7157092","text":"public function current()\n {\n $this->skipNextIteration = false;\n\n return current($this->data);\n }","title":""},{"docid":"45d49268e0af3468651a68ebf711cd72","score":"0.7095235","text":"public function current()\n {\n return current($this->iterableObject);\n }","title":""},{"docid":"f700b5fd69205641a9ea45a550f4c199","score":"0.70892656","text":"public function current(){\n\n\t\t\t//get index for current position\n\t\t\t$index = $this->ids[$this->position];\n\n\t\t\t//returns item at index\n\t\t\treturn $this->items[$index];\n\t\t}","title":""},{"docid":"05cd425f1732a8d3182e668d60fa9b96","score":"0.70844024","text":"public function current() {\n\t\t\treturn $this->getValue($this->pointer);\n\t\t}","title":""},{"docid":"c2719ee63684cd56c82188ab07e20aa7","score":"0.70803183","text":"public function current () {\n\n\t\treturn $this->_collection->get_item($this->_keys[$this->_currIndex]);\n\t\n\t}","title":""},{"docid":"ccbc04d7a16d88a5a2752550c96626fd","score":"0.7037596","text":"public function current() {\n if ( empty( $this->_order ) ) {\n $this->sort();\n }\n\n return $this->offsetGet( $this->_order[ $this->_current ] );\n }","title":""},{"docid":"7a54cc1f106f47fab86b85d4ae755c0f","score":"0.70240533","text":"public function current() {\n return $this->_value[$this->_key];\n }","title":""},{"docid":"4d579cb6add71ededdb0c47e5dd30877","score":"0.7016927","text":"public function current()\n {\n\n $index = $this->iterator->key();\n if ($index > 0 && $index % self::BATCH_SIZE === 0) {\n $this->clearState();\n }\n\n $nodeData = $this->iterator->current();\n $node = $this->getNode($nodeData[0]);\n // detach the entity from ORM to save memory\n //$this->query->getEntityManager()->detach($nodeData[0]);\n return $node;\n }","title":""},{"docid":"91c8fa8cf0359c462220a886b05749b9","score":"0.700311","text":"public function current() {\n return $this->data[$this->keys[$this->position]];\n }","title":""},{"docid":"94d7de4cd5839b81b473aa0db4992315","score":"0.7000546","text":"public function next()\n {\n $this->resetIterator();\n return $this->iterator->next();\n }","title":""},{"docid":"56cce756b11d16f991245c8b423257db","score":"0.697936","text":"public function current() {\n return $this->_position === null ? null : $this->_data[$this->_position];\n }","title":""},{"docid":"f2a6d26aff7227e818b348eceff1d059","score":"0.69765645","text":"public function current() {\n $this->seekPointer($this->position);\n return $this->fetch();\n }","title":""},{"docid":"a109b900ef5394a53206d7a5a74bce21","score":"0.69718987","text":"public function next()\n {\n return next($this->elements);\n }","title":""},{"docid":"a109b900ef5394a53206d7a5a74bce21","score":"0.69718987","text":"public function next()\n {\n return next($this->elements);\n }","title":""},{"docid":"0e739f2fe7682d6157fd8eec82be2c6c","score":"0.696662","text":"public function next() {\n if ($this->currentIndex + 1 > sizeof($this->items)) {\n throw new Exception('no such element');\n }\n $k = $this->keys[$this->currentIndex++];\n return $this->items[$k];\n }","title":""},{"docid":"360afda97945fbbd7028fad1c24675a8","score":"0.69471353","text":"public function current() {\n\t\treturn current($this->_items);\n\t}","title":""},{"docid":"d799c85e3d95407b31d16d53803cec3b","score":"0.6942065","text":"public function next()\n {\n return $this->getInnerIterator()->next();\n }","title":""},{"docid":"84cacaf3d5397c18d3f16e02b8afe5a7","score":"0.69279087","text":"public function current()\n {\n return $this->Data[$this->Pointer];\n }","title":""},{"docid":"0ab9ceffe657beeac00d69b56995a635","score":"0.6926905","text":"public function current()\n {\n return current($this->_lookup);\n }","title":""},{"docid":"e934bbba1b06478cf7b0b9210628a503","score":"0.6926265","text":"public function current()\n\t{\n\t\treturn $this->_nodeList->item($this->_position);\n\t}","title":""},{"docid":"a5302c0a0fc38b0961bb9a8a8091b4ae","score":"0.6920186","text":"public function first()\n {\n return reset($this->elements);\n }","title":""},{"docid":"a5302c0a0fc38b0961bb9a8a8091b4ae","score":"0.6920186","text":"public function first()\n {\n return reset($this->elements);\n }","title":""},{"docid":"06a368c3b93db46d0bfc7116a40d5598","score":"0.6909604","text":"public function current()\n\t{\n\t\treturn current($this->items);\n\t}","title":""},{"docid":"0fe475b7fab5920618ecbdc3acfba8fa","score":"0.6881524","text":"public function current()\n {\n return current($this->_items);\n }","title":""},{"docid":"030b4e7b002206e316553e94df12d73f","score":"0.6868","text":"public function current() {\n\t\t$values = array_values($this->data);\n\t\treturn $values[$this->position];\n\t}","title":""},{"docid":"fbfc9356e87af4f70fcc270a76435fe1","score":"0.6859413","text":"public function current()\n {\n return current($this->array);\n }","title":""},{"docid":"07388236e4e93bee780720d517a222c2","score":"0.6855819","text":"public function current() {\n return current($this->_items);\n }","title":""},{"docid":"b822aabe9348b2246f05cad0daffc48a","score":"0.6850805","text":"public function current()\n {\n return current($this->items);\n }","title":""},{"docid":"b822aabe9348b2246f05cad0daffc48a","score":"0.6850805","text":"public function current()\n {\n return current($this->items);\n }","title":""},{"docid":"2c3a581747c4223c0a16f937238002a7","score":"0.6837797","text":"public function current()\n {\n return current($this->_entities);\n }","title":""},{"docid":"a48ffbf656f7d2db3ede2f543df23615","score":"0.68347245","text":"#[\\ReturnTypeWillChange]\n public function current()\n {\n return $this->_posts[$this->_iteratorKey];\n }","title":""},{"docid":"0c9e371050bae721b2e9a0433bde7c06","score":"0.68326485","text":"public function current()\n {\n return $this->map[$this->key];\n }","title":""},{"docid":"e2aa0bb5529c0f2758ba876ff75c0c38","score":"0.68098515","text":"public function getElement() {\n return $this->stack [$this->index]->getElement();\n }","title":""},{"docid":"4d570d3cf206bcef145db23766fb0c60","score":"0.6809523","text":"public function current()\n {\n return current($this->aVal);\n }","title":""},{"docid":"67a2009f0d3116364aef706bcb2d7858","score":"0.6805346","text":"public function current() {\n\t\tif ($this->_current === null) {\n\t\t\t$this->_current = $this->extract();\n\t\t}\n\n\t\treturn $this->_current;\n\t}","title":""},{"docid":"d50ff8b3829e969f5a44abf99f353eb7","score":"0.680163","text":"public function current() {\n return $this->data[0];\n }","title":""},{"docid":"0166fc03f2479c11b313a48634e44f17","score":"0.6774803","text":"public function next()\n\t{\n\t\tif ($this->hasNext())\n\t\t{\n\t\t\t$this->canRemove = true;\n\t\t\treturn $this->list->get(--$this->index);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Could not find element at index {$this->index}\");\n\t\t}\n\t}","title":""},{"docid":"b3ab00991d2dbde5f3e8dcb949cfb6f9","score":"0.6774502","text":"public function current()\n {\n return $this->done ? null: $this->x;\n }","title":""},{"docid":"1e2f8a1ea3df7efb18a4e8b29d3b1447","score":"0.67695695","text":"public function current() {\n $var = current($this->values);\n return $var;\n }","title":""},{"docid":"7845bc3d3f91d5523b03f9dfe5d880cf","score":"0.6765618","text":"public function current()\n {\n // return current AbstractItem\n return current($this->results);\n }","title":""},{"docid":"837faa8cd77c4550c09e3359df12fe13","score":"0.67650676","text":"public function current()\n {\n return $this->getRow($this->pointer);\n }","title":""},{"docid":"0fbc8685f4983f18479b7aa75e42356c","score":"0.6756913","text":"public function current()\n {\n return current($this->collection);\n }","title":""},{"docid":"0fbc8685f4983f18479b7aa75e42356c","score":"0.6756913","text":"public function current()\n {\n return current($this->collection);\n }","title":""},{"docid":"0fbc8685f4983f18479b7aa75e42356c","score":"0.6756913","text":"public function current()\n {\n return current($this->collection);\n }","title":""},{"docid":"7df5984c0bc391eddf8fee7e7db6eae3","score":"0.67496294","text":"public function current(){\n return $this->Collection->get($this->key());\n }","title":""},{"docid":"2092a37455b89410db66adbee1cde0c5","score":"0.6746611","text":"public function current() {\n\t\treturn current($this->_data);\n\t}","title":""},{"docid":"2092a37455b89410db66adbee1cde0c5","score":"0.6746611","text":"public function current() {\n\t\treturn current($this->_data);\n\t}","title":""},{"docid":"97beab3ce181dcf172316bf32148bace","score":"0.6741269","text":"public function next()\n {\n try {\n $element = $this->queue->dequeue();\n return $element;\n } catch (\\RuntimeException $exception) {\n throw new \\RuntimeException(\"No next element.\");\n }\n }","title":""},{"docid":"650a74250ed207e8ecff91d57d3bdf0c","score":"0.6734712","text":"function current()\n {\n return $this->_employees[$this->_position];\n }","title":""},{"docid":"edc439d6a4593859b53384fb64fe26b6","score":"0.67272776","text":"public function current() {\n return $this[key($this->data)];\n }","title":""},{"docid":"174c9aff9a51893fa5b17aa0f1c39675","score":"0.6723462","text":"public function current()\n {\n return $this->getItem($this->getCurrentIndex());\n }","title":""},{"docid":"42abe1676922a410e4994109725faf4e","score":"0.67232853","text":"public function current()\r\n {\r\n return $this->obj->data[$this->currentIndex];\r\n }","title":""},{"docid":"02daacc9b5f8ed0a79b537cb264ec3f2","score":"0.6721843","text":"public function peek()\n\t{\n\t\treturn $this->get();\n\t}","title":""},{"docid":"4fb4f4df08238aa92d35dda2cbca56e8","score":"0.67173177","text":"public function current(): EntryInterface\n {\n return $this->entries[$this->iterator];\n }","title":""},{"docid":"98d41c1bf0776be111ea98b6f9264ace","score":"0.6716646","text":"public function current()\n {\n return $this->mapArray[$this->position];\n }","title":""},{"docid":"db3e17e8f1b63592464902dabbd1e113","score":"0.6713485","text":"public function current ()\n {\n return current($this->_data);\n }","title":""},{"docid":"f5c7de882661bdb8cefc9fa5fa4fd3e8","score":"0.6697768","text":"public function current()\n\t{\n\t\treturn current($this->_data);\n\t}","title":""},{"docid":"fd990a78652448c6917060d3c5988f86","score":"0.66946614","text":"function current(){\n\t\treturn $this->mixValue[$this->_numPosition];\n\t}","title":""},{"docid":"9df60bb9bffa4788039cd652ab1a8fc6","score":"0.66792566","text":"public function current()\n {\n return current($this->_data);\n }","title":""},{"docid":"7544b732625e653a17dc3c9be727e83f","score":"0.6677571","text":"public function current() {\n\t\treturn current($this->data);\n\t}","title":""},{"docid":"c8394458b4bc28a73f63a1b28b43a817","score":"0.667584","text":"public function first()\r\n {\r\n return $this->get(0);\r\n }","title":""},{"docid":"0ffae5ed5518a37247a8f4438c293efd","score":"0.66752625","text":"public function current() {\r\n\t\t\treturn getEpgEntryByRow($this->curRow);\r\n\t\t}","title":""},{"docid":"7268effd8a48a94f9026e2658186e733","score":"0.6671111","text":"public function current()\n {\n return $this->childNodes[$this->currentNode];\n }","title":""},{"docid":"7782c944a9fb514a920b7fbc183fee4e","score":"0.6667931","text":"public function next()\n {\n $this->index++;\n\n return $this->valid() ? $this->current() : null;\n }","title":""},{"docid":"47aac8065de85efbbc9c26b8aa97be73","score":"0.66533643","text":"public function current()\n\t{\n\t\treturn current($this->tags);\n\t}","title":""},{"docid":"07651f5c2af3c88e6ab427aace007898","score":"0.6650419","text":"public function first()\n {\n $elements = $this->elements;\n\n return !empty($elements) ? reset($elements) : null;\n }","title":""},{"docid":"d5e21120a2a82bb99745ccf21e2c0802","score":"0.66496694","text":"public function current() {\n return $this->_row;\n }","title":""},{"docid":"e250473d4201bc4f06f4b2341b5a94e9","score":"0.66467696","text":"public function current() {\n return $this->heap->current();\n }","title":""},{"docid":"6d8e6b73d649e1371e45c8017e8d2bfa","score":"0.6639406","text":"public function next()\n {\n return next($this->array);\n }","title":""},{"docid":"ada785d8153cd0696fbe5bf35186ce98","score":"0.66252416","text":"public function current()\n {\n return $this->valid() ? $this->_result[$this->_current_document] : NULL;\n }","title":""},{"docid":"f54f2b7ce6a2823909ae142d71288b79","score":"0.66227317","text":"public function current()\n {\n return $this->getAttributes()[$this->key()];\n }","title":""}],"string":"[\n {\n \"docid\": \"6b0de8369e254089e392fc63887e6c4a\",\n \"score\": \"0.7771353\",\n \"text\": \"private function getCurrentElement()\\n {\\n return $this->iteratorCacheIterator->current();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b889b834a29ddf997c2bd4758e2c8f1\",\n \"score\": \"0.7652126\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn $this->iterators->current()->current();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60658e795f0411c39eb394341d113987\",\n \"score\": \"0.7552457\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\t$this->initializeIterator();\\n\\t\\treturn $this->iterator->current();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f33dc07ecb5f501f34f63832e24ab43\",\n \"score\": \"0.75313425\",\n \"text\": \"public function current()\\n {\\n if ($this->currentIndex >= $this->length) {\\n throw new IndexOutOfRangeException(sprintf('Index %d out of range', $this->currentIndex), 1410183473);\\n }\\n if (!isset($this->elements[$this->currentIndex])) {\\n return null;\\n }\\n\\n return $this->elements[$this->currentIndex];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dee362456bab7f5ada12748ddf85317\",\n \"score\": \"0.7528658\",\n \"text\": \"function current()\\n {\\n return $this->_cache[$this->_iterator_position];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a91759cb38c32b764e4e380badd7933\",\n \"score\": \"0.75247645\",\n \"text\": \"public function current()\\n {\\n $this->resetIterator();\\n return $this->iterator->current();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fa1962728571b43c91a34f00867cfec\",\n \"score\": \"0.74886924\",\n \"text\": \"public function current() {\\n return $this->iterator->current();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c893502c94027f68a521e41a9e1713c1\",\n \"score\": \"0.74760836\",\n \"text\": \"public function current()\\n {\\n return $this->itemAt($this->ptr);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63138d3ba5290b5dc7d93833e0234df9\",\n \"score\": \"0.7423226\",\n \"text\": \"public function current()\\n {\\n return current($this->elements);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63138d3ba5290b5dc7d93833e0234df9\",\n \"score\": \"0.7423226\",\n \"text\": \"public function current()\\n {\\n return current($this->elements);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a46698ba13defbf6831a844e7a79544\",\n \"score\": \"0.74085414\",\n \"text\": \"public function current()\\n {\\n return $this->getInnerIterator()->current();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10b47d44ec6e0b7772d5ff640c66a9eb\",\n \"score\": \"0.74008703\",\n \"text\": \"public function get()\\n {\\n $current = $this->current();\\n $this->next();\\n return $current;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d77e574fa19270be4c9f5731e0bb08d2\",\n \"score\": \"0.73975086\",\n \"text\": \"public function current()\\n {\\n return $this->values[$this->iterpos];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"087007929f4df0b019068755cdc7890d\",\n \"score\": \"0.7361074\",\n \"text\": \"public function current()\\n {\\n return $this->collection[$this->pointer];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9cfc1dbe0dc3b2013ff0f48bb4faef9\",\n \"score\": \"0.7336792\",\n \"text\": \"public function current() {\\n\\t\\treturn $this->at( $this->position );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7919ffcd0029430d0877d2c14b8467b0\",\n \"score\": \"0.73209965\",\n \"text\": \"public function current()\\n {\\n $this->skipNextIteration = false;\\n return \\\\current($this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4c4462a281c7af3e8bf93feee4ae411\",\n \"score\": \"0.7305018\",\n \"text\": \"public function next()\\n {\\n return $this->iterator->next();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3499a2ada645e397e7bcb44fa4109b66\",\n \"score\": \"0.7276862\",\n \"text\": \"public function current()\\n {\\n return $this->items[$this->pos];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de4eb424d139d582629b8e71b8987a9c\",\n \"score\": \"0.72564596\",\n \"text\": \"public function current()\\n {\\n return $this->_collection[$this->_pos];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76dfc2f1aeed102d59b9c9d8942de9db\",\n \"score\": \"0.7249776\",\n \"text\": \"public function current() {\\n $k = $this->keys[$this->currentIndex];\\n return $this->items[$k];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e50fa98f86edfc3709944a913fab9a39\",\n \"score\": \"0.7243198\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn $this->item( $this->position );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38c7606499f4dccb12163064555b2280\",\n \"score\": \"0.72347337\",\n \"text\": \"public function current()\\n {\\n return $this->items[$this->cursor];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eee6510d249a4bd8f4d125122b6a2a6c\",\n \"score\": \"0.7220048\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn $this->_values[ $this->_i ];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8177c30f3304c8aca16387ee9a09aa2\",\n \"score\": \"0.72057456\",\n \"text\": \"public function getOne()\\n {\\n if ($this->count() > 0)\\n {\\n $this->seek(0);\\n return $this->current();\\n } else\\n return null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78294d27f28c79901a4fcd7ebb21ab7d\",\n \"score\": \"0.7205004\",\n \"text\": \"public function current()\\n {\\n return $this->offsetGet($this->key());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d111690d6375b03cd4fb94f7c94c7875\",\n \"score\": \"0.7202218\",\n \"text\": \"function current()\\n {\\n return $this->items[$this->position];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44e30b9ec13df9ad10fb3ba66b0c3392\",\n \"score\": \"0.71940273\",\n \"text\": \"public function current()\\n {\\n return $this->_items[$this->_key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ef24d4c56b04f54a771d1ba1b535a7b\",\n \"score\": \"0.71863437\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn $this->_values[$this->_idx];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c7de91ea179e624d4fe19de08557aa0\",\n \"score\": \"0.71655685\",\n \"text\": \"public function current()\\n {\\n return $this->items[$this->keys[$this->index]];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36764726db25bedbabc0e39f58e9261b\",\n \"score\": \"0.71618205\",\n \"text\": \"public function current()\\n {\\n return $this->items[ $this->pointerCurrent ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fc9bf557c9df91d4325f6cf372d4fdd\",\n \"score\": \"0.7157092\",\n \"text\": \"public function current()\\n {\\n $this->skipNextIteration = false;\\n\\n return current($this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45d49268e0af3468651a68ebf711cd72\",\n \"score\": \"0.7095235\",\n \"text\": \"public function current()\\n {\\n return current($this->iterableObject);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f700b5fd69205641a9ea45a550f4c199\",\n \"score\": \"0.70892656\",\n \"text\": \"public function current(){\\n\\n\\t\\t\\t//get index for current position\\n\\t\\t\\t$index = $this->ids[$this->position];\\n\\n\\t\\t\\t//returns item at index\\n\\t\\t\\treturn $this->items[$index];\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05cd425f1732a8d3182e668d60fa9b96\",\n \"score\": \"0.70844024\",\n \"text\": \"public function current() {\\n\\t\\t\\treturn $this->getValue($this->pointer);\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2719ee63684cd56c82188ab07e20aa7\",\n \"score\": \"0.70803183\",\n \"text\": \"public function current () {\\n\\n\\t\\treturn $this->_collection->get_item($this->_keys[$this->_currIndex]);\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccbc04d7a16d88a5a2752550c96626fd\",\n \"score\": \"0.7037596\",\n \"text\": \"public function current() {\\n if ( empty( $this->_order ) ) {\\n $this->sort();\\n }\\n\\n return $this->offsetGet( $this->_order[ $this->_current ] );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a54cc1f106f47fab86b85d4ae755c0f\",\n \"score\": \"0.70240533\",\n \"text\": \"public function current() {\\n return $this->_value[$this->_key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d579cb6add71ededdb0c47e5dd30877\",\n \"score\": \"0.7016927\",\n \"text\": \"public function current()\\n {\\n\\n $index = $this->iterator->key();\\n if ($index > 0 && $index % self::BATCH_SIZE === 0) {\\n $this->clearState();\\n }\\n\\n $nodeData = $this->iterator->current();\\n $node = $this->getNode($nodeData[0]);\\n // detach the entity from ORM to save memory\\n //$this->query->getEntityManager()->detach($nodeData[0]);\\n return $node;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91c8fa8cf0359c462220a886b05749b9\",\n \"score\": \"0.700311\",\n \"text\": \"public function current() {\\n return $this->data[$this->keys[$this->position]];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94d7de4cd5839b81b473aa0db4992315\",\n \"score\": \"0.7000546\",\n \"text\": \"public function next()\\n {\\n $this->resetIterator();\\n return $this->iterator->next();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56cce756b11d16f991245c8b423257db\",\n \"score\": \"0.697936\",\n \"text\": \"public function current() {\\n return $this->_position === null ? null : $this->_data[$this->_position];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2a6d26aff7227e818b348eceff1d059\",\n \"score\": \"0.69765645\",\n \"text\": \"public function current() {\\n $this->seekPointer($this->position);\\n return $this->fetch();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a109b900ef5394a53206d7a5a74bce21\",\n \"score\": \"0.69718987\",\n \"text\": \"public function next()\\n {\\n return next($this->elements);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a109b900ef5394a53206d7a5a74bce21\",\n \"score\": \"0.69718987\",\n \"text\": \"public function next()\\n {\\n return next($this->elements);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e739f2fe7682d6157fd8eec82be2c6c\",\n \"score\": \"0.696662\",\n \"text\": \"public function next() {\\n if ($this->currentIndex + 1 > sizeof($this->items)) {\\n throw new Exception('no such element');\\n }\\n $k = $this->keys[$this->currentIndex++];\\n return $this->items[$k];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"360afda97945fbbd7028fad1c24675a8\",\n \"score\": \"0.69471353\",\n \"text\": \"public function current() {\\n\\t\\treturn current($this->_items);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d799c85e3d95407b31d16d53803cec3b\",\n \"score\": \"0.6942065\",\n \"text\": \"public function next()\\n {\\n return $this->getInnerIterator()->next();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84cacaf3d5397c18d3f16e02b8afe5a7\",\n \"score\": \"0.69279087\",\n \"text\": \"public function current()\\n {\\n return $this->Data[$this->Pointer];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ab9ceffe657beeac00d69b56995a635\",\n \"score\": \"0.6926905\",\n \"text\": \"public function current()\\n {\\n return current($this->_lookup);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e934bbba1b06478cf7b0b9210628a503\",\n \"score\": \"0.6926265\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn $this->_nodeList->item($this->_position);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5302c0a0fc38b0961bb9a8a8091b4ae\",\n \"score\": \"0.6920186\",\n \"text\": \"public function first()\\n {\\n return reset($this->elements);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5302c0a0fc38b0961bb9a8a8091b4ae\",\n \"score\": \"0.6920186\",\n \"text\": \"public function first()\\n {\\n return reset($this->elements);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06a368c3b93db46d0bfc7116a40d5598\",\n \"score\": \"0.6909604\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn current($this->items);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fe475b7fab5920618ecbdc3acfba8fa\",\n \"score\": \"0.6881524\",\n \"text\": \"public function current()\\n {\\n return current($this->_items);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"030b4e7b002206e316553e94df12d73f\",\n \"score\": \"0.6868\",\n \"text\": \"public function current() {\\n\\t\\t$values = array_values($this->data);\\n\\t\\treturn $values[$this->position];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbfc9356e87af4f70fcc270a76435fe1\",\n \"score\": \"0.6859413\",\n \"text\": \"public function current()\\n {\\n return current($this->array);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07388236e4e93bee780720d517a222c2\",\n \"score\": \"0.6855819\",\n \"text\": \"public function current() {\\n return current($this->_items);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b822aabe9348b2246f05cad0daffc48a\",\n \"score\": \"0.6850805\",\n \"text\": \"public function current()\\n {\\n return current($this->items);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b822aabe9348b2246f05cad0daffc48a\",\n \"score\": \"0.6850805\",\n \"text\": \"public function current()\\n {\\n return current($this->items);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c3a581747c4223c0a16f937238002a7\",\n \"score\": \"0.6837797\",\n \"text\": \"public function current()\\n {\\n return current($this->_entities);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a48ffbf656f7d2db3ede2f543df23615\",\n \"score\": \"0.68347245\",\n \"text\": \"#[\\\\ReturnTypeWillChange]\\n public function current()\\n {\\n return $this->_posts[$this->_iteratorKey];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c9e371050bae721b2e9a0433bde7c06\",\n \"score\": \"0.68326485\",\n \"text\": \"public function current()\\n {\\n return $this->map[$this->key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2aa0bb5529c0f2758ba876ff75c0c38\",\n \"score\": \"0.68098515\",\n \"text\": \"public function getElement() {\\n return $this->stack [$this->index]->getElement();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d570d3cf206bcef145db23766fb0c60\",\n \"score\": \"0.6809523\",\n \"text\": \"public function current()\\n {\\n return current($this->aVal);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67a2009f0d3116364aef706bcb2d7858\",\n \"score\": \"0.6805346\",\n \"text\": \"public function current() {\\n\\t\\tif ($this->_current === null) {\\n\\t\\t\\t$this->_current = $this->extract();\\n\\t\\t}\\n\\n\\t\\treturn $this->_current;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d50ff8b3829e969f5a44abf99f353eb7\",\n \"score\": \"0.680163\",\n \"text\": \"public function current() {\\n return $this->data[0];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0166fc03f2479c11b313a48634e44f17\",\n \"score\": \"0.6774803\",\n \"text\": \"public function next()\\n\\t{\\n\\t\\tif ($this->hasNext())\\n\\t\\t{\\n\\t\\t\\t$this->canRemove = true;\\n\\t\\t\\treturn $this->list->get(--$this->index);\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\tthrow new NoSuchElementException(\\\"Could not find element at index {$this->index}\\\");\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3ab00991d2dbde5f3e8dcb949cfb6f9\",\n \"score\": \"0.6774502\",\n \"text\": \"public function current()\\n {\\n return $this->done ? null: $this->x;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e2f8a1ea3df7efb18a4e8b29d3b1447\",\n \"score\": \"0.67695695\",\n \"text\": \"public function current() {\\n $var = current($this->values);\\n return $var;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7845bc3d3f91d5523b03f9dfe5d880cf\",\n \"score\": \"0.6765618\",\n \"text\": \"public function current()\\n {\\n // return current AbstractItem\\n return current($this->results);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"837faa8cd77c4550c09e3359df12fe13\",\n \"score\": \"0.67650676\",\n \"text\": \"public function current()\\n {\\n return $this->getRow($this->pointer);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fbc8685f4983f18479b7aa75e42356c\",\n \"score\": \"0.6756913\",\n \"text\": \"public function current()\\n {\\n return current($this->collection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fbc8685f4983f18479b7aa75e42356c\",\n \"score\": \"0.6756913\",\n \"text\": \"public function current()\\n {\\n return current($this->collection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fbc8685f4983f18479b7aa75e42356c\",\n \"score\": \"0.6756913\",\n \"text\": \"public function current()\\n {\\n return current($this->collection);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7df5984c0bc391eddf8fee7e7db6eae3\",\n \"score\": \"0.67496294\",\n \"text\": \"public function current(){\\n return $this->Collection->get($this->key());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2092a37455b89410db66adbee1cde0c5\",\n \"score\": \"0.6746611\",\n \"text\": \"public function current() {\\n\\t\\treturn current($this->_data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2092a37455b89410db66adbee1cde0c5\",\n \"score\": \"0.6746611\",\n \"text\": \"public function current() {\\n\\t\\treturn current($this->_data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97beab3ce181dcf172316bf32148bace\",\n \"score\": \"0.6741269\",\n \"text\": \"public function next()\\n {\\n try {\\n $element = $this->queue->dequeue();\\n return $element;\\n } catch (\\\\RuntimeException $exception) {\\n throw new \\\\RuntimeException(\\\"No next element.\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"650a74250ed207e8ecff91d57d3bdf0c\",\n \"score\": \"0.6734712\",\n \"text\": \"function current()\\n {\\n return $this->_employees[$this->_position];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edc439d6a4593859b53384fb64fe26b6\",\n \"score\": \"0.67272776\",\n \"text\": \"public function current() {\\n return $this[key($this->data)];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"174c9aff9a51893fa5b17aa0f1c39675\",\n \"score\": \"0.6723462\",\n \"text\": \"public function current()\\n {\\n return $this->getItem($this->getCurrentIndex());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42abe1676922a410e4994109725faf4e\",\n \"score\": \"0.67232853\",\n \"text\": \"public function current()\\r\\n {\\r\\n return $this->obj->data[$this->currentIndex];\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02daacc9b5f8ed0a79b537cb264ec3f2\",\n \"score\": \"0.6721843\",\n \"text\": \"public function peek()\\n\\t{\\n\\t\\treturn $this->get();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fb4f4df08238aa92d35dda2cbca56e8\",\n \"score\": \"0.67173177\",\n \"text\": \"public function current(): EntryInterface\\n {\\n return $this->entries[$this->iterator];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98d41c1bf0776be111ea98b6f9264ace\",\n \"score\": \"0.6716646\",\n \"text\": \"public function current()\\n {\\n return $this->mapArray[$this->position];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db3e17e8f1b63592464902dabbd1e113\",\n \"score\": \"0.6713485\",\n \"text\": \"public function current ()\\n {\\n return current($this->_data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5c7de882661bdb8cefc9fa5fa4fd3e8\",\n \"score\": \"0.6697768\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn current($this->_data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd990a78652448c6917060d3c5988f86\",\n \"score\": \"0.66946614\",\n \"text\": \"function current(){\\n\\t\\treturn $this->mixValue[$this->_numPosition];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9df60bb9bffa4788039cd652ab1a8fc6\",\n \"score\": \"0.66792566\",\n \"text\": \"public function current()\\n {\\n return current($this->_data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7544b732625e653a17dc3c9be727e83f\",\n \"score\": \"0.6677571\",\n \"text\": \"public function current() {\\n\\t\\treturn current($this->data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8394458b4bc28a73f63a1b28b43a817\",\n \"score\": \"0.667584\",\n \"text\": \"public function first()\\r\\n {\\r\\n return $this->get(0);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ffae5ed5518a37247a8f4438c293efd\",\n \"score\": \"0.66752625\",\n \"text\": \"public function current() {\\r\\n\\t\\t\\treturn getEpgEntryByRow($this->curRow);\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7268effd8a48a94f9026e2658186e733\",\n \"score\": \"0.6671111\",\n \"text\": \"public function current()\\n {\\n return $this->childNodes[$this->currentNode];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7782c944a9fb514a920b7fbc183fee4e\",\n \"score\": \"0.6667931\",\n \"text\": \"public function next()\\n {\\n $this->index++;\\n\\n return $this->valid() ? $this->current() : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47aac8065de85efbbc9c26b8aa97be73\",\n \"score\": \"0.66533643\",\n \"text\": \"public function current()\\n\\t{\\n\\t\\treturn current($this->tags);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07651f5c2af3c88e6ab427aace007898\",\n \"score\": \"0.6650419\",\n \"text\": \"public function first()\\n {\\n $elements = $this->elements;\\n\\n return !empty($elements) ? reset($elements) : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5e21120a2a82bb99745ccf21e2c0802\",\n \"score\": \"0.66496694\",\n \"text\": \"public function current() {\\n return $this->_row;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e250473d4201bc4f06f4b2341b5a94e9\",\n \"score\": \"0.66467696\",\n \"text\": \"public function current() {\\n return $this->heap->current();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d8e6b73d649e1371e45c8017e8d2bfa\",\n \"score\": \"0.6639406\",\n \"text\": \"public function next()\\n {\\n return next($this->array);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ada785d8153cd0696fbe5bf35186ce98\",\n \"score\": \"0.66252416\",\n \"text\": \"public function current()\\n {\\n return $this->valid() ? $this->_result[$this->_current_document] : NULL;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f54f2b7ce6a2823909ae142d71288b79\",\n \"score\": \"0.66227317\",\n \"text\": \"public function current()\\n {\\n return $this->getAttributes()[$this->key()];\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":579,"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":"b47feb43b462361562d06390c796bbd3","score":"0.0","text":"public function create()\n {\n return view();\n }","title":""}],"string":"[\n {\n \"docid\": \"b47feb43b462361562d06390c796bbd3\",\n \"score\": \"0.0\",\n \"text\": \"public function create()\\n {\\n return view();\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"79bd06c9a9147df30474aace0ff64511","score":"0.765267","text":"public function create()\n\t{\n\t\treturn View::make('secureadmin.resources.create');\n\t}","title":""},{"docid":"2bc399e3e37eaad09b15e38f2a68e11a","score":"0.7570936","text":"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}","title":""},{"docid":"9ce2c0e041c9fd47a4927ea76ac4dec1","score":"0.75241786","text":"public function actionCreate()\n {\n if(!Yii::$app->user->can('admin')){\n throw new ForbiddenHttpException(Yii::t('app','forbidden'));\n }\n\n $model = new Resource();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['resource/index']);\n } else {\n return $this->renderAjax('_form', [\n 'model' => $model,\n ]);\n }\n }","title":""},{"docid":"eefd3a34279d87bd94753b0beae69b0d","score":"0.7392314","text":"public function create()\n {\n return view('humanresources::create');\n }","title":""},{"docid":"ccbf298ff6b7fe3fc99a2c43c7044671","score":"0.73542404","text":"public function create()\n {\n if (is_null($this->resource)) {\n return view('admin.errors.unresolved-resource');\n }\n\n $className = Manager::getResourceClass($this->resource);\n\n $model = Manager::instantiateResource($this->resource);\n\n if (is_null($model)) {\n return view('admin.errors.inexistent-model');\n }\n\n return view(Manager::resolveResourceView($this->resource, 'edit'), [\n 'resource' => $this->resource,\n 'model' => $model,\n 'action' => 'store',\n 'token' => csrf_token()\n ]);\n }","title":""},{"docid":"3a2b518b64d41d79de586443a25fc6b4","score":"0.733233","text":"public function create()\n {\n $enterprise = 'Resources Ltd.';\n $data = [];\n $data['enterprise'] = $enterprise;\n return view('resource.create', $data);\n }","title":""},{"docid":"624172c9b446660675cfc218201c4893","score":"0.7289654","text":"public function create()\n {\n return view('student.create_form');\n }","title":""},{"docid":"db8dcffc1ba4b2b605dcce1b909738fb","score":"0.72889465","text":"public function create()\n {\n return view('iforms::admin.forms.create');\n }","title":""},{"docid":"9814fd9ae63509e6eb41bf23f7a94615","score":"0.7278289","text":"public function create()\n {\n return view('forms.create');\n }","title":""},{"docid":"9b8422e12173f216746dee60bf33c3d0","score":"0.72551644","text":"public function create(Resource $resource) {\n return view('admin.resources.create', [\n 'resource' => $resource\n ]);\n }","title":""},{"docid":"13c8115a5531399b8349f3dc63b250c9","score":"0.72198445","text":"public function create()\n\t{\n\t\treturn View::make('form8as.create');\n\t}","title":""},{"docid":"2256010cbfe6b1a946cb9e41eb0fcdf7","score":"0.72015285","text":"protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/User/create');\n\n\t}","title":""},{"docid":"3fb888dea195139fc63f84a6e5b7db63","score":"0.72011584","text":"public function create()\n {\n return View::make($this->resourceView.'.create');\n }","title":""},{"docid":"c24e65c8a92dd430f73967cd2fb00ec9","score":"0.7176135","text":"public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }","title":""},{"docid":"329743cf1b042cac0daeb4f0daa763b6","score":"0.7129428","text":"public function create()\n {\n return view('forms.form');\n }","title":""},{"docid":"9e9055cb2a8fbd71b31656ad3be35242","score":"0.71211916","text":"public function create()\n\t{\n\t\treturn View::make('form');\n\t}","title":""},{"docid":"72d70e3f4e644e89aa9fc634f522e9f3","score":"0.71185786","text":"public function create()\n {\n return view('pengguna.form_create');\n }","title":""},{"docid":"8217f78e0802225ffa5ceaca8a306ad6","score":"0.71154547","text":"public function create_form()\n {\n return view('dashboard.add-post');\n }","title":""},{"docid":"03cb579a16562d9c16209eb75a728e1b","score":"0.71152735","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 return view('admin.general.add_form')->with($data);\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.7113729","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.7113729","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"63b10f50a8dceba6cbfaa8ee592a3368","score":"0.711126","text":"public function create()\n {\n return view('dish.create_form');\n }","title":""},{"docid":"21b741286121defb618cafb010ad9311","score":"0.71002555","text":"public function create()\n {\n return view('admin.crud.edit-new');\n }","title":""},{"docid":"8095f9d5db36b0cb76f17111897cdb3c","score":"0.70784336","text":"public function create()\n {\n $pageTitle = \"Create New Form\";\n\n $saveURL = route('formbuilder::forms.store');\n\n // get the roles to use to populate the make the 'Access' section of the form builder work\n $form_roles = Helper::getConfiguredRoles();\n\n return view('Forms.create', compact('pageTitle', 'saveURL', 'form_roles'));\n }","title":""},{"docid":"20da805cc8877d3018a5e2ca32361d90","score":"0.7078187","text":"public function create()\n {\n $title = 'Nova marca';\n\n $bred = 'Cadastro de marca';\n\n return view('panel.brands.form', compact('title', 'bred'));\n }","title":""},{"docid":"a3472bb62fbfd95113a02e6ab298fb16","score":"0.70517206","text":"public function create()\n {\n return view('admin.new.create');\n }","title":""},{"docid":"891f6ed99624f790e6ba87605bd33af5","score":"0.7051254","text":"public function create()\n {\n return view(\"admin.{$this->viewName}.form\");\n }","title":""},{"docid":"3220a8cacf1d32c34277393ecab00add","score":"0.7047101","text":"public function create()\n {\n return view('sucursal.new');\n }","title":""},{"docid":"26cbce1c8f0499af8424ebd1f6a6dd57","score":"0.7016089","text":"public function create()\n\t{\n\t\treturn View::make(\"patient.addbasic\");\n\t}","title":""},{"docid":"a5a196e155c478bce8bcc9f63265458b","score":"0.70074666","text":"public function actionCreate()\n\t{\n\n\t\t$this->render('create',array(\n\t\t));\n\t}","title":""},{"docid":"d06f7c1afab4e59a10f15d0cb1d3c4b8","score":"0.7006627","text":"function create()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\t$this->initForm(\"create\");\n\t\t$tpl->setContent($this->form->getHTML());\n\t}","title":""},{"docid":"3802afaa74a89f2c8d6425e7d6e1cdc7","score":"0.7006505","text":"public function create()\n\t{\n\t\treturn view('klien.create');\n\t}","title":""},{"docid":"af465604f58a84e14427dc5be704c4c8","score":"0.70041883","text":"public function create()\n {\n return view('backend.restoran.create');\n }","title":""},{"docid":"64a5d2efa5fafb8dc83ad1c29fe35fd6","score":"0.6991964","text":"public function create()\n {\n //\n $url = \"program_insert\";\n return View('master.program.form', compact('url'));\n }","title":""},{"docid":"12adf4e56f62b6fd6b2be421f733cdb4","score":"0.6983467","text":"public function create()\n {\n return view( 'create' );\n }","title":""},{"docid":"ab5df463c7a9233952e868bf92dc1ef6","score":"0.69829875","text":"public function create()\r\n {\r\n return view('linhas.create');\r\n }","title":""},{"docid":"4f2c32b4e7b7e1111779bbd20db9bcc2","score":"0.6980452","text":"public function create()\n {\n //\n return view('pages.mahasiswa.book.form');\n }","title":""},{"docid":"d143d78cb1c9dfb874e8c5f56cd86ff1","score":"0.69729996","text":"public function newForm(){\n return view('Admin.Forms.NewForm');\n }","title":""},{"docid":"dfd7817f96e3d3a8efbdc92b688530d2","score":"0.6972556","text":"public function create()\n {\n return view('books.form');\n }","title":""},{"docid":"7f62c25e75c6df1439832323661ce428","score":"0.6969679","text":"public function create()\n {\n return view('books.bookForm');\n }","title":""},{"docid":"e5bf495201669521b638af27fa8cddb5","score":"0.69665015","text":"public function create()\n {\n return view('formation.add');\n }","title":""},{"docid":"ddc9c9c46de513be5e3d6891c9ab972f","score":"0.6953832","text":"public function create()\n {\n return view(\"addstudent/create\");\n }","title":""},{"docid":"d0269072317f50ab5efacd83467f863a","score":"0.69520956","text":"public function create()\n {\n return view('rays.form');\n }","title":""},{"docid":"8ed65484ff2ee4c220e635b0137f51c9","score":"0.6949395","text":"public function create()\n {\n return view('show.create');\n }","title":""},{"docid":"05ae7e731f712a3380173a15672178bf","score":"0.69482964","text":"public function create() {\n\n //reponse payload\n $payload = [\n 'page' => $this->pageSettings('create'),\n 'resource_types' => $this->resource_types,\n ];\n\n //show the form\n return new CreateResponse($payload);\n }","title":""},{"docid":"d7c7a20338802e16bc22ca75369f06a2","score":"0.69435793","text":"public function create()\n {\n return view('layouts.color.admin.form');\n }","title":""},{"docid":"6ecf3520dbc6b244775e5b497a7565a4","score":"0.69420505","text":"public function create()\n {\n return view('nfrs.create');\n }","title":""},{"docid":"b897f80400a545eb9d55f183d938e642","score":"0.6938868","text":"public function create()\n\t{\n return View::make('collections.form');\n\t}","title":""},{"docid":"7a7cfb5c8701aba1d25ea45b2cf5b102","score":"0.6930071","text":"public function create() {\n\t\treturn view('admin.tuwasadkrisi.create');\n\t}","title":""},{"docid":"45617f9262f7e3e6d319d5b51f153fb1","score":"0.69250184","text":"public function create()\n {\n //\n return view('admin.marca.form');\n }","title":""},{"docid":"b549e5d3e6fe0a503fe0f90668ef99f4","score":"0.69231105","text":"public function create()\n {\n //\n return view('student.add');\n }","title":""},{"docid":"a917cc1c921d761746db4cf9f3e12a3a","score":"0.6922968","text":"public function create()\n {\n return view($this->options['route-views'].\"save\")\n ->with('options', $this->options)\n ->with('typeForm', 'create');\n }","title":""},{"docid":"77e3877fefe4a530102f2f40dc331626","score":"0.69229466","text":"public function create()\n {\n // Return question create form\n return view('questions/create');\n }","title":""},{"docid":"71caf91bb376f2407900d7d27c12fd02","score":"0.6922729","text":"public function newAction()\n {\n $entity = new Association();\n $form = $this->createForm(new AssociationType(), $entity);\n\n return $this->render('TperroinTremplinFoyerBundle:Association:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"31d54f71e037cde5639bddde8f2bb7b7","score":"0.69220674","text":"public function create()\n {\n return view('laramanager::entries.create')\n ->with('resource', $this->resource);\n }","title":""},{"docid":"cd36d2eae1d0581a0d2c1a4e0882c5af","score":"0.69201124","text":"public function create()\n {\n return view('app/new');\n }","title":""},{"docid":"8dccedea5fc74866be1212fb9ebe4a9f","score":"0.69165653","text":"public function new_form() {\n return view('kontak.create');\n }","title":""},{"docid":"365c59355a0ce7a203acd4498f821d8b","score":"0.6913677","text":"public function create()\n {\n return view('form'); //\n }","title":""},{"docid":"e2cc21568f5c3d0b0bef89ccbb160341","score":"0.69136274","text":"public function create()\n {\n return view(\"penjualan.create\");\n }","title":""},{"docid":"103c74e80f239cbc3e37ed94963cceb9","score":"0.69130963","text":"public function create()\n {\n $data['action'] = 'barang.store';\n return view('barang.form', $data);\n }","title":""},{"docid":"1d9a9b2f025f67d3cda5ec1f705d2b24","score":"0.69127375","text":"public function create()\n\t{\n\t\treturn view('bangunans.create');\n\t}","title":""},{"docid":"72909e874fb00adb84d22089fc22c21f","score":"0.6909977","text":"public function create()\n {\n return view('admin.supplier.form');\n }","title":""},{"docid":"cb3e538aa4f105751ebd074337f54482","score":"0.6906848","text":"public function create()\n {\n return view('item.form');\n }","title":""},{"docid":"dd5e5000187112fd8684e974a6d38884","score":"0.6904029","text":"public function create()\n {\n return view(\"admin.nilai.add\");\n }","title":""},{"docid":"b621d190772589f9c347b44d221d8300","score":"0.69029367","text":"public function create()\n\t{\n\t\treturn View::make('convenios.create');\n\t}","title":""},{"docid":"9469e97df6a2418f25d408bc6f6f3872","score":"0.69019115","text":"public function create()\n {\n //\n return view('bibliotecas.bibliotecaForm');\n }","title":""},{"docid":"48699531a3cac8bd90071b858ee8a7b4","score":"0.6901559","text":"public function create()\n {\n $data['action'] = 'gaji.store';\n return view('gaji.form', $data);\n }","title":""},{"docid":"4880a5fb962d118934f1229ef1a0bc83","score":"0.6901516","text":"public function create()\n {\n return view('problem_view_forms.create');\n }","title":""},{"docid":"a9f59a4d1eafbac435893dad09baa298","score":"0.6900824","text":"public function create()\n {\n return view('arklys.create');\n \n }","title":""},{"docid":"ec3395e988fcbe87d4d546a3daa901e9","score":"0.69006634","text":"public function create()\n {\n return view('book.add');\n }","title":""},{"docid":"799a7107ca6c011a3a40d5681eb321ba","score":"0.6898071","text":"public function create()\n {\n return view('admin.enterprises.form');\n }","title":""},{"docid":"f6cfc53832cf748cf4dc7b872721a0cd","score":"0.6896023","text":"public function create()\n {\n return view('Enterprise.create');\n }","title":""},{"docid":"b026faf0a320028862c1ad2d3bb9025a","score":"0.6894049","text":"public function create()\n {\n return view('Libro.create');\n }","title":""},{"docid":"72905472eb77524448338f6d4f09819a","score":"0.68893313","text":"public function create()\n {\n\t\t// load the create form (app/views/project/create.blade.php)\n// \t\treturn view('project.create');\n //\n }","title":""},{"docid":"6769fe63e35d4f98abe507728065b246","score":"0.68891996","text":"public function create()\r\n {\r\n return view('superadmin::create');\r\n }","title":""},{"docid":"f881c92fd91c0c6e85a0013d05cabef9","score":"0.6888425","text":"public function create()\n\t{\n\t\treturn view('angular.field.create');\n\t}","title":""},{"docid":"bdb0161d2f2f44cdaea93bf890a4c02e","score":"0.6887327","text":"public function create()\n {\n return view(\"create\");\n }","title":""},{"docid":"d337f2838be9202f4347f66c29dec41a","score":"0.68868446","text":"public function create()\n {\n return view('rekening::create');\n }","title":""},{"docid":"96a1b829528ee1892db1a16ea7cc051c","score":"0.6885274","text":"public function create()\n {\n //\n return view('pages/Applicant/applicant-add-wizard');\n }","title":""},{"docid":"97d13fc67b6142f744517f2666c328f9","score":"0.688448","text":"public function create()\n {\n return view('siklus.create');\n }","title":""},{"docid":"b196d7397b30ecc10fff3289f162f61d","score":"0.68808806","text":"public function create()\n\t{\n\t\treturn View::make('addbook');\n\t}","title":""},{"docid":"0370323e1b0084d6bb286aa9a34a36b4","score":"0.6878268","text":"public function create()\n {\n return view('admin/book/add_book');\n }","title":""},{"docid":"555640b44052bbd2e0076c664a730072","score":"0.6876852","text":"public function create()\n {\n $this->pageData['MainHeading'] = \"Add \" . $this->singularName;\n $this->pageData['PageTitle'] = \"Add \" . $this->singularName;\n $this->pageData['SubNav'] = \"Add WebUser\";\n $this->pageData['NavHeading'] = \"New \" . $this->singularName;\n\n // Add App Form\n $form = $this->form();\n return view('admin.add')\n ->with(['pageData' => $this->pageData])\n ->with(compact('form'))\n ->with(compact('jsValidator'));\n }","title":""},{"docid":"e9d218bc4e14ef9fc16a178fb3c0a8a7","score":"0.6876479","text":"public function create()\n {\n return view('student.add_student');\n }","title":""},{"docid":"fa5d4892f2202fe3e2b430e8601c7914","score":"0.6874497","text":"public function create()\n {\n return view('kelas.form');\n }","title":""},{"docid":"f24fafb5071cdedf2996c6f0b152c5d9","score":"0.6874058","text":"public function create()\n {\n $model = new Student();\n return view('student.form', compact('model'));\n }","title":""},{"docid":"21c99f7ff784906712457bbb6803a266","score":"0.6869173","text":"public function create()\n {\n return view('/inventario/inventarioForm');\n }","title":""},{"docid":"585c34487cf4b9a7f9702352a458a207","score":"0.686754","text":"public function create()\n {\n return view(\"vm.create\");\n }","title":""},{"docid":"23a9a2968aad0f2152e0b0b2f726e4a7","score":"0.6863911","text":"public function create()\n {\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\n 'route_path' => $this->route, 'form' => $this->form) );\n }","title":""},{"docid":"5413823d42105e7ba8892f6a6617ee65","score":"0.6860771","text":"public function create()\n {\n return admin_view('trick.form');\n }","title":""},{"docid":"72662bf2c4720e8e93ece21009afefbc","score":"0.6858028","text":"public function create()\n {\n $recipe = new Recipe;\n $formAction = action('RecipeController@store');\n return view(\"backend.recipes.form\", compact('recipe', 'formAction'));\n }","title":""},{"docid":"451449463d63fe09435ede6575b0059a","score":"0.68573004","text":"public function create()\n\t{\n\t\treturn view('presentasis.create');\n\t}","title":""},{"docid":"1f02999647bca142e1e38a50a78a2029","score":"0.68568254","text":"public function create()\n\t{\n\t\treturn view('admin.cars.create') ;\n\t}","title":""},{"docid":"5f6d12f938909e021083d25409fea8ca","score":"0.6856568","text":"public function create()\n \t{\n \t\treturn view('jenisobat.create');\n \t}","title":""},{"docid":"637c25fe6061e30a8bb2e6f2975a200c","score":"0.68560255","text":"public function newAction()\n {\n $entity = new Conference();\n $form = $this->createForm(new ConferenceType(), $entity);\n\n return $this->render('CfpConferenceBundle:Conference:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }","title":""},{"docid":"6a8820b7d2e1b22f6ff49cfebd079202","score":"0.6852283","text":"public function newAction()\n {\n $entity = new Restaurant();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MesdLunchBundle:Restaurant:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n\n\n ));\n }","title":""},{"docid":"44d743ec633ed862b902c3ae3c644d23","score":"0.68522525","text":"public function create()\n {\n return view(\"admin.{$this->tableName}.add-edit\")\n ->with([\n \"model\"=>null,\n \"action\"=> \"/{$this->tableName}/store\",\n\n ]);\n }","title":""},{"docid":"f941e8fc1096557e8ff62a805c7a1003","score":"0.68516916","text":"public function create()\n {\n return view('Solicitud.create');\n }","title":""},{"docid":"e4a3eb616afb7000bb22ee5422af1276","score":"0.6850431","text":"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cidade\";\n\n return view('admin.cities.form', compact('title', 'subtitle'));\n }","title":""},{"docid":"d58534453dca5d05eb6bf9759a643eaa","score":"0.6849974","text":"public function create()\n\t{\n\t\treturn View::make('create');\n\t}","title":""},{"docid":"08b2b1dc380d0797db7570a3627d8b31","score":"0.6848771","text":"public function create()\n {\n return view('courier_record.add');\n }","title":""}],"string":"[\n {\n \"docid\": \"79bd06c9a9147df30474aace0ff64511\",\n \"score\": \"0.765267\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('secureadmin.resources.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bc399e3e37eaad09b15e38f2a68e11a\",\n \"score\": \"0.7570936\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn $this->showForm('create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ce2c0e041c9fd47a4927ea76ac4dec1\",\n \"score\": \"0.75241786\",\n \"text\": \"public function actionCreate()\\n {\\n if(!Yii::$app->user->can('admin')){\\n throw new ForbiddenHttpException(Yii::t('app','forbidden'));\\n }\\n\\n $model = new Resource();\\n\\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\\n return $this->redirect(['resource/index']);\\n } else {\\n return $this->renderAjax('_form', [\\n 'model' => $model,\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eefd3a34279d87bd94753b0beae69b0d\",\n \"score\": \"0.7392314\",\n \"text\": \"public function create()\\n {\\n return view('humanresources::create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccbf298ff6b7fe3fc99a2c43c7044671\",\n \"score\": \"0.73542404\",\n \"text\": \"public function create()\\n {\\n if (is_null($this->resource)) {\\n return view('admin.errors.unresolved-resource');\\n }\\n\\n $className = Manager::getResourceClass($this->resource);\\n\\n $model = Manager::instantiateResource($this->resource);\\n\\n if (is_null($model)) {\\n return view('admin.errors.inexistent-model');\\n }\\n\\n return view(Manager::resolveResourceView($this->resource, 'edit'), [\\n 'resource' => $this->resource,\\n 'model' => $model,\\n 'action' => 'store',\\n 'token' => csrf_token()\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a2b518b64d41d79de586443a25fc6b4\",\n \"score\": \"0.733233\",\n \"text\": \"public function create()\\n {\\n $enterprise = 'Resources Ltd.';\\n $data = [];\\n $data['enterprise'] = $enterprise;\\n return view('resource.create', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"624172c9b446660675cfc218201c4893\",\n \"score\": \"0.7289654\",\n \"text\": \"public function create()\\n {\\n return view('student.create_form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db8dcffc1ba4b2b605dcce1b909738fb\",\n \"score\": \"0.72889465\",\n \"text\": \"public function create()\\n {\\n return view('iforms::admin.forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9814fd9ae63509e6eb41bf23f7a94615\",\n \"score\": \"0.7278289\",\n \"text\": \"public function create()\\n {\\n return view('forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b8422e12173f216746dee60bf33c3d0\",\n \"score\": \"0.72551644\",\n \"text\": \"public function create(Resource $resource) {\\n return view('admin.resources.create', [\\n 'resource' => $resource\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13c8115a5531399b8349f3dc63b250c9\",\n \"score\": \"0.72198445\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('form8as.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2256010cbfe6b1a946cb9e41eb0fcdf7\",\n \"score\": \"0.72015285\",\n \"text\": \"protected function showCreateForm()\\n\\t{\\n\\n\\t\\treturn Response::view('adm/User/create');\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fb888dea195139fc63f84a6e5b7db63\",\n \"score\": \"0.72011584\",\n \"text\": \"public function create()\\n {\\n return View::make($this->resourceView.'.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c24e65c8a92dd430f73967cd2fb00ec9\",\n \"score\": \"0.7176135\",\n \"text\": \"public function create()\\n {\\n $this->resetValidation();\\n $this->reset(['fields', 'is_editing']);\\n\\n $this->showForm();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"329743cf1b042cac0daeb4f0daa763b6\",\n \"score\": \"0.7129428\",\n \"text\": \"public function create()\\n {\\n return view('forms.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e9055cb2a8fbd71b31656ad3be35242\",\n \"score\": \"0.71211916\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('form');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72d70e3f4e644e89aa9fc634f522e9f3\",\n \"score\": \"0.71185786\",\n \"text\": \"public function create()\\n {\\n return view('pengguna.form_create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8217f78e0802225ffa5ceaca8a306ad6\",\n \"score\": \"0.71154547\",\n \"text\": \"public function create_form()\\n {\\n return view('dashboard.add-post');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03cb579a16562d9c16209eb75a728e1b\",\n \"score\": \"0.71152735\",\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 return view('admin.general.add_form')->with($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.7113729\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.7113729\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63b10f50a8dceba6cbfaa8ee592a3368\",\n \"score\": \"0.711126\",\n \"text\": \"public function create()\\n {\\n return view('dish.create_form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21b741286121defb618cafb010ad9311\",\n \"score\": \"0.71002555\",\n \"text\": \"public function create()\\n {\\n return view('admin.crud.edit-new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8095f9d5db36b0cb76f17111897cdb3c\",\n \"score\": \"0.70784336\",\n \"text\": \"public function create()\\n {\\n $pageTitle = \\\"Create New Form\\\";\\n\\n $saveURL = route('formbuilder::forms.store');\\n\\n // get the roles to use to populate the make the 'Access' section of the form builder work\\n $form_roles = Helper::getConfiguredRoles();\\n\\n return view('Forms.create', compact('pageTitle', 'saveURL', 'form_roles'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20da805cc8877d3018a5e2ca32361d90\",\n \"score\": \"0.7078187\",\n \"text\": \"public function create()\\n {\\n $title = 'Nova marca';\\n\\n $bred = 'Cadastro de marca';\\n\\n return view('panel.brands.form', compact('title', 'bred'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3472bb62fbfd95113a02e6ab298fb16\",\n \"score\": \"0.70517206\",\n \"text\": \"public function create()\\n {\\n return view('admin.new.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"891f6ed99624f790e6ba87605bd33af5\",\n \"score\": \"0.7051254\",\n \"text\": \"public function create()\\n {\\n return view(\\\"admin.{$this->viewName}.form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3220a8cacf1d32c34277393ecab00add\",\n \"score\": \"0.7047101\",\n \"text\": \"public function create()\\n {\\n return view('sucursal.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26cbce1c8f0499af8424ebd1f6a6dd57\",\n \"score\": \"0.7016089\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make(\\\"patient.addbasic\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5a196e155c478bce8bcc9f63265458b\",\n \"score\": \"0.70074666\",\n \"text\": \"public function actionCreate()\\n\\t{\\n\\n\\t\\t$this->render('create',array(\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d06f7c1afab4e59a10f15d0cb1d3c4b8\",\n \"score\": \"0.7006627\",\n \"text\": \"function create()\\n\\t{\\n\\t\\tglobal $tpl;\\n\\t\\t\\n\\t\\t$this->initForm(\\\"create\\\");\\n\\t\\t$tpl->setContent($this->form->getHTML());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3802afaa74a89f2c8d6425e7d6e1cdc7\",\n \"score\": \"0.7006505\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('klien.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af465604f58a84e14427dc5be704c4c8\",\n \"score\": \"0.70041883\",\n \"text\": \"public function create()\\n {\\n return view('backend.restoran.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64a5d2efa5fafb8dc83ad1c29fe35fd6\",\n \"score\": \"0.6991964\",\n \"text\": \"public function create()\\n {\\n //\\n $url = \\\"program_insert\\\";\\n return View('master.program.form', compact('url'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12adf4e56f62b6fd6b2be421f733cdb4\",\n \"score\": \"0.6983467\",\n \"text\": \"public function create()\\n {\\n return view( 'create' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab5df463c7a9233952e868bf92dc1ef6\",\n \"score\": \"0.69829875\",\n \"text\": \"public function create()\\r\\n {\\r\\n return view('linhas.create');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f2c32b4e7b7e1111779bbd20db9bcc2\",\n \"score\": \"0.6980452\",\n \"text\": \"public function create()\\n {\\n //\\n return view('pages.mahasiswa.book.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d143d78cb1c9dfb874e8c5f56cd86ff1\",\n \"score\": \"0.69729996\",\n \"text\": \"public function newForm(){\\n return view('Admin.Forms.NewForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dfd7817f96e3d3a8efbdc92b688530d2\",\n \"score\": \"0.6972556\",\n \"text\": \"public function create()\\n {\\n return view('books.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f62c25e75c6df1439832323661ce428\",\n \"score\": \"0.6969679\",\n \"text\": \"public function create()\\n {\\n return view('books.bookForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5bf495201669521b638af27fa8cddb5\",\n \"score\": \"0.69665015\",\n \"text\": \"public function create()\\n {\\n return view('formation.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddc9c9c46de513be5e3d6891c9ab972f\",\n \"score\": \"0.6953832\",\n \"text\": \"public function create()\\n {\\n return view(\\\"addstudent/create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0269072317f50ab5efacd83467f863a\",\n \"score\": \"0.69520956\",\n \"text\": \"public function create()\\n {\\n return view('rays.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ed65484ff2ee4c220e635b0137f51c9\",\n \"score\": \"0.6949395\",\n \"text\": \"public function create()\\n {\\n return view('show.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05ae7e731f712a3380173a15672178bf\",\n \"score\": \"0.69482964\",\n \"text\": \"public function create() {\\n\\n //reponse payload\\n $payload = [\\n 'page' => $this->pageSettings('create'),\\n 'resource_types' => $this->resource_types,\\n ];\\n\\n //show the form\\n return new CreateResponse($payload);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7c7a20338802e16bc22ca75369f06a2\",\n \"score\": \"0.69435793\",\n \"text\": \"public function create()\\n {\\n return view('layouts.color.admin.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ecf3520dbc6b244775e5b497a7565a4\",\n \"score\": \"0.69420505\",\n \"text\": \"public function create()\\n {\\n return view('nfrs.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b897f80400a545eb9d55f183d938e642\",\n \"score\": \"0.6938868\",\n \"text\": \"public function create()\\n\\t{\\n return View::make('collections.form');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a7cfb5c8701aba1d25ea45b2cf5b102\",\n \"score\": \"0.6930071\",\n \"text\": \"public function create() {\\n\\t\\treturn view('admin.tuwasadkrisi.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45617f9262f7e3e6d319d5b51f153fb1\",\n \"score\": \"0.69250184\",\n \"text\": \"public function create()\\n {\\n //\\n return view('admin.marca.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b549e5d3e6fe0a503fe0f90668ef99f4\",\n \"score\": \"0.69231105\",\n \"text\": \"public function create()\\n {\\n //\\n return view('student.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a917cc1c921d761746db4cf9f3e12a3a\",\n \"score\": \"0.6922968\",\n \"text\": \"public function create()\\n {\\n return view($this->options['route-views'].\\\"save\\\")\\n ->with('options', $this->options)\\n ->with('typeForm', 'create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77e3877fefe4a530102f2f40dc331626\",\n \"score\": \"0.69229466\",\n \"text\": \"public function create()\\n {\\n // Return question create form\\n return view('questions/create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71caf91bb376f2407900d7d27c12fd02\",\n \"score\": \"0.6922729\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Association();\\n $form = $this->createForm(new AssociationType(), $entity);\\n\\n return $this->render('TperroinTremplinFoyerBundle:Association:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31d54f71e037cde5639bddde8f2bb7b7\",\n \"score\": \"0.69220674\",\n \"text\": \"public function create()\\n {\\n return view('laramanager::entries.create')\\n ->with('resource', $this->resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd36d2eae1d0581a0d2c1a4e0882c5af\",\n \"score\": \"0.69201124\",\n \"text\": \"public function create()\\n {\\n return view('app/new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8dccedea5fc74866be1212fb9ebe4a9f\",\n \"score\": \"0.69165653\",\n \"text\": \"public function new_form() {\\n return view('kontak.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"365c59355a0ce7a203acd4498f821d8b\",\n \"score\": \"0.6913677\",\n \"text\": \"public function create()\\n {\\n return view('form'); //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2cc21568f5c3d0b0bef89ccbb160341\",\n \"score\": \"0.69136274\",\n \"text\": \"public function create()\\n {\\n return view(\\\"penjualan.create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"103c74e80f239cbc3e37ed94963cceb9\",\n \"score\": \"0.69130963\",\n \"text\": \"public function create()\\n {\\n $data['action'] = 'barang.store';\\n return view('barang.form', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d9a9b2f025f67d3cda5ec1f705d2b24\",\n \"score\": \"0.69127375\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('bangunans.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72909e874fb00adb84d22089fc22c21f\",\n \"score\": \"0.6909977\",\n \"text\": \"public function create()\\n {\\n return view('admin.supplier.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb3e538aa4f105751ebd074337f54482\",\n \"score\": \"0.6906848\",\n \"text\": \"public function create()\\n {\\n return view('item.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd5e5000187112fd8684e974a6d38884\",\n \"score\": \"0.6904029\",\n \"text\": \"public function create()\\n {\\n return view(\\\"admin.nilai.add\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b621d190772589f9c347b44d221d8300\",\n \"score\": \"0.69029367\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('convenios.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9469e97df6a2418f25d408bc6f6f3872\",\n \"score\": \"0.69019115\",\n \"text\": \"public function create()\\n {\\n //\\n return view('bibliotecas.bibliotecaForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48699531a3cac8bd90071b858ee8a7b4\",\n \"score\": \"0.6901559\",\n \"text\": \"public function create()\\n {\\n $data['action'] = 'gaji.store';\\n return view('gaji.form', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4880a5fb962d118934f1229ef1a0bc83\",\n \"score\": \"0.6901516\",\n \"text\": \"public function create()\\n {\\n return view('problem_view_forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9f59a4d1eafbac435893dad09baa298\",\n \"score\": \"0.6900824\",\n \"text\": \"public function create()\\n {\\n return view('arklys.create');\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec3395e988fcbe87d4d546a3daa901e9\",\n \"score\": \"0.69006634\",\n \"text\": \"public function create()\\n {\\n return view('book.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"799a7107ca6c011a3a40d5681eb321ba\",\n \"score\": \"0.6898071\",\n \"text\": \"public function create()\\n {\\n return view('admin.enterprises.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6cfc53832cf748cf4dc7b872721a0cd\",\n \"score\": \"0.6896023\",\n \"text\": \"public function create()\\n {\\n return view('Enterprise.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b026faf0a320028862c1ad2d3bb9025a\",\n \"score\": \"0.6894049\",\n \"text\": \"public function create()\\n {\\n return view('Libro.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72905472eb77524448338f6d4f09819a\",\n \"score\": \"0.68893313\",\n \"text\": \"public function create()\\n {\\n\\t\\t// load the create form (app/views/project/create.blade.php)\\n// \\t\\treturn view('project.create');\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6769fe63e35d4f98abe507728065b246\",\n \"score\": \"0.68891996\",\n \"text\": \"public function create()\\r\\n {\\r\\n return view('superadmin::create');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f881c92fd91c0c6e85a0013d05cabef9\",\n \"score\": \"0.6888425\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('angular.field.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdb0161d2f2f44cdaea93bf890a4c02e\",\n \"score\": \"0.6887327\",\n \"text\": \"public function create()\\n {\\n return view(\\\"create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d337f2838be9202f4347f66c29dec41a\",\n \"score\": \"0.68868446\",\n \"text\": \"public function create()\\n {\\n return view('rekening::create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96a1b829528ee1892db1a16ea7cc051c\",\n \"score\": \"0.6885274\",\n \"text\": \"public function create()\\n {\\n //\\n return view('pages/Applicant/applicant-add-wizard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97d13fc67b6142f744517f2666c328f9\",\n \"score\": \"0.688448\",\n \"text\": \"public function create()\\n {\\n return view('siklus.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b196d7397b30ecc10fff3289f162f61d\",\n \"score\": \"0.68808806\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('addbook');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0370323e1b0084d6bb286aa9a34a36b4\",\n \"score\": \"0.6878268\",\n \"text\": \"public function create()\\n {\\n return view('admin/book/add_book');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"555640b44052bbd2e0076c664a730072\",\n \"score\": \"0.6876852\",\n \"text\": \"public function create()\\n {\\n $this->pageData['MainHeading'] = \\\"Add \\\" . $this->singularName;\\n $this->pageData['PageTitle'] = \\\"Add \\\" . $this->singularName;\\n $this->pageData['SubNav'] = \\\"Add WebUser\\\";\\n $this->pageData['NavHeading'] = \\\"New \\\" . $this->singularName;\\n\\n // Add App Form\\n $form = $this->form();\\n return view('admin.add')\\n ->with(['pageData' => $this->pageData])\\n ->with(compact('form'))\\n ->with(compact('jsValidator'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9d218bc4e14ef9fc16a178fb3c0a8a7\",\n \"score\": \"0.6876479\",\n \"text\": \"public function create()\\n {\\n return view('student.add_student');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5d4892f2202fe3e2b430e8601c7914\",\n \"score\": \"0.6874497\",\n \"text\": \"public function create()\\n {\\n return view('kelas.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f24fafb5071cdedf2996c6f0b152c5d9\",\n \"score\": \"0.6874058\",\n \"text\": \"public function create()\\n {\\n $model = new Student();\\n return view('student.form', compact('model'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21c99f7ff784906712457bbb6803a266\",\n \"score\": \"0.6869173\",\n \"text\": \"public function create()\\n {\\n return view('/inventario/inventarioForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"585c34487cf4b9a7f9702352a458a207\",\n \"score\": \"0.686754\",\n \"text\": \"public function create()\\n {\\n return view(\\\"vm.create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23a9a2968aad0f2152e0b0b2f726e4a7\",\n \"score\": \"0.6863911\",\n \"text\": \"public function create()\\n {\\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\\n 'route_path' => $this->route, 'form' => $this->form) );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5413823d42105e7ba8892f6a6617ee65\",\n \"score\": \"0.6860771\",\n \"text\": \"public function create()\\n {\\n return admin_view('trick.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72662bf2c4720e8e93ece21009afefbc\",\n \"score\": \"0.6858028\",\n \"text\": \"public function create()\\n {\\n $recipe = new Recipe;\\n $formAction = action('RecipeController@store');\\n return view(\\\"backend.recipes.form\\\", compact('recipe', 'formAction'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"451449463d63fe09435ede6575b0059a\",\n \"score\": \"0.68573004\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('presentasis.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f02999647bca142e1e38a50a78a2029\",\n \"score\": \"0.68568254\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('admin.cars.create') ;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f6d12f938909e021083d25409fea8ca\",\n \"score\": \"0.6856568\",\n \"text\": \"public function create()\\n \\t{\\n \\t\\treturn view('jenisobat.create');\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"637c25fe6061e30a8bb2e6f2975a200c\",\n \"score\": \"0.68560255\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Conference();\\n $form = $this->createForm(new ConferenceType(), $entity);\\n\\n return $this->render('CfpConferenceBundle:Conference:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView()\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a8820b7d2e1b22f6ff49cfebd079202\",\n \"score\": \"0.6852283\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Restaurant();\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('MesdLunchBundle:Restaurant:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n\\n\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44d743ec633ed862b902c3ae3c644d23\",\n \"score\": \"0.68522525\",\n \"text\": \"public function create()\\n {\\n return view(\\\"admin.{$this->tableName}.add-edit\\\")\\n ->with([\\n \\\"model\\\"=>null,\\n \\\"action\\\"=> \\\"/{$this->tableName}/store\\\",\\n\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f941e8fc1096557e8ff62a805c7a1003\",\n \"score\": \"0.68516916\",\n \"text\": \"public function create()\\n {\\n return view('Solicitud.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a3eb616afb7000bb22ee5422af1276\",\n \"score\": \"0.6850431\",\n \"text\": \"public function create()\\n {\\n $title = $this->title;\\n $subtitle = \\\"Adicionar cidade\\\";\\n\\n return view('admin.cities.form', compact('title', 'subtitle'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d58534453dca5d05eb6bf9759a643eaa\",\n \"score\": \"0.6849974\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08b2b1dc380d0797db7570a3627d8b31\",\n \"score\": \"0.6848771\",\n \"text\": \"public function create()\\n {\\n return view('courier_record.add');\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":580,"cells":{"query_id":{"kind":"string","value":"13723369ee210991fbaeff150e6325a0"},"query":{"kind":"string","value":"Display the specified resource."},"positive_passages":{"kind":"list like","value":[{"docid":"4bac3188558c3acab53dd8d5175c1d4e","score":"0.0","text":"public function show($id)\n {\n //\n }","title":""}],"string":"[\n {\n \"docid\": \"4bac3188558c3acab53dd8d5175c1d4e\",\n \"score\": \"0.0\",\n \"text\": \"public function show($id)\\n {\\n //\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"ac91646235dc2026e2b2e54b03ba6edb","score":"0.8190437","text":"public function show(Resource $resource)\n {\n //\n }","title":""},{"docid":"9b47c918056858ef14b85bd8a41414c1","score":"0.7020616","text":"public function showAction(Humanresource $humanresource)\n {\n $deleteForm = $this->createDeleteForm($humanresource);\n\n return $this->render('humanresource/show.html.twig', array(\n 'humanresource' => $humanresource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }","title":""},{"docid":"aef322cbfb19d79a77dc0e74e6e7bc96","score":"0.67904377","text":"public function showAction()\n {\n $config = $this->getConfiguration();\n\n $view = $this\n ->view()\n ->setTemplate($config->getTemplate('show.html'))\n ->setTemplateVar($config->getResourceName())\n ->setData($this->findOr404())\n ;\n\n return $this->handleView($view);\n }","title":""},{"docid":"fb41f4ccc0d7db950d06ac1a19456fa2","score":"0.67305946","text":"public function actionView() {\n $id = isset($_GET['id']) ? (int)($_GET['id']) : 0;\n $this->menu=array_merge($this->menu, \n array(\n array('label'=>Yii::t('cms','Update this Resource'), 'url'=>array('update','id'=>$id),'linkOptions'=>array('class'=>'button')),\n array('label'=>Yii::t('cms','View this Resource'), 'url'=>array('view','id'=>$id),'linkOptions'=>array('class'=>'button'))\n )\n );\n $model_name = \"Resource\";\n $id = isset($_GET['id']) ? (int)$_GET['id'] : 0;\n $model = GxcHelpers::loadDetailModel($model_name, $id);\n $this->render('view', array(\n \"model\" => $model\n ));\n }","title":""},{"docid":"ab30516f6991bb772fd61ae9fec2439c","score":"0.6560534","text":"public function show(project_resource $project_resource)\n {\n //\n }","title":""},{"docid":"243cb80d371f620d93edb23fd4a5ec6c","score":"0.65553087","text":"public function showAction()\n {\n \ttry {\n \t\t$requestId = $this->getRequest()->getParam('id');\n \t\t$this->view->entity = $this->_service->findById($requestId);\n\n \t} catch(Svs_Service_Exception $e){\n \t\tthrow $e;\n \t}\n\n\t\t$this->view->partialName = sprintf(\n\t\t\t'partials/%s-show.phtml', $this->_controller\n\t\t);\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/show', null, true);\n }","title":""},{"docid":"6ad7532d4e18e95bb51cb89fd46c6f3e","score":"0.64986944","text":"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }","title":""},{"docid":"cfa7e3b5483e85906491eaedb4b1f7af","score":"0.6410644","text":"abstract public function render($resource_name);","title":""},{"docid":"99db7dc2adb2a8f31daaf5823ce99e3e","score":"0.63273495","text":"public function testDisplayResourceViaShowMethod()\n\t{\n\t\t$this->stub->show();\n\n\t\t$refl = new \\ReflectionObject($this->stub);\n\t\t$attributes = $refl->getProperty('attributes');\n\t\t$attributes->setAccessible(true);\n\n\t\t$attrib = $attributes->getValue($this->stub);\n\n\t\t$this->assertTrue($attrib['visible']);\n\t}","title":""},{"docid":"1b1f2555033be5c6cba96c89cae71c6c","score":"0.62645876","text":"public function show(Role_resource $role_resource)\n {\n //\n }","title":""},{"docid":"a5d61876efad2a8ab6e7897e60e10aa5","score":"0.6230868","text":"public function show($id)\n {\n // Showing each items\n // Use resource controller\n }","title":""},{"docid":"37fd3e719ea9cbc59455081cf591c629","score":"0.61330074","text":"public function serve($resource)\n { \n $resource = ($resource !== '') ? $resource : $this->defaultResource;\n $file = $this->viewsLocation.$resource;\n\n if (!file_exists($file))\n {\n throw new \\Exception(\"The {$resource} was not found in {$this->viewsLocation} directory!\");\n }\n\n $loader = new \\Twig_Loader_Filesystem(VIEW_PATH);\n $twig = new \\Twig_Environment($loader, array(\n 'cache' => Config::get('app.debug') ? false : CACHE_PATH.'/resource'\n ));\n\n $template = $twig->loadTemplate($resource);\n $this->render($template->display(Config::all()));\n }","title":""},{"docid":"cca5b6bb346929960196841d06bdbc25","score":"0.6132742","text":"protected function callView($resource)\n {\n $collection = $this->getTableName($resource);\n $modelName = $this->getModelName($resource);\n\n if ($this->confirm(\"Do you want me to create views for this $modelName resource? [yes|no]\"))\n {\n foreach(['index', 'show', 'create', 'edit'] as $viewName)\n {\n $viewName = \"{$collection}.{$viewName}\";\n\n $this->call('generate:view', compact('viewName'));\n }\n }\n }","title":""},{"docid":"ae6dfcef42246fa0bc047caa2a2e6abf","score":"0.61027944","text":"protected function callView($resource)\n\t{\n\t\t$collection = $this->getTableName($resource);\n\t\t$modelName = $this->getModelName($resource);\n\t\t$controllerName = $this->getControllerName($resource);\n\n\t\tif ($this->confirm(\"Do you want me to create views for this $modelName resource? [yes|no]\"))\n\t\t{\n\t\t\tforeach(['index', 'show', 'create', 'edit', 'form'] as $viewName)\n\t\t\t{\n\t\t\t\t$this->call('generate:view', [\n\t\t\t\t\t'viewName' => \"{$collection}.{$viewName}\",\n\t\t\t\t\t'--templatePath' => Config::get(\"generators::config.scaffold_view_\" . $viewName . \"_template_path\"),\n\t\t\t\t\t'controllerName' => $controllerName\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"b39bdad40da5bd2a2191db02238d9733","score":"0.6039017","text":"public function show(Resource $resource)\n {\n\n // dd(TvValue::where('tv_id', 1)->with('tv')->get()->toArray());\n\n return new ResourceResource($resource);\n\n // return new ResourceResource(\n // Resource::with(['tvValues.tv'])->first()\n // );\n\n\n // return new ResourceResource(\n // Resource::with(['template.tvs', 'template.tvs.value' => function ($q) use ($resource) {\n // $q->where('resource_id', $resource->id); //only one value per tv/resource\n // }])->first()\n // );\n }","title":""},{"docid":"152bd291ac464c8a798a231a537e9077","score":"0.60048014","text":"public function showOneResourceAction($slug) {\n $em = $this->getDoctrine()->getEntityManager();\n //get post repo\n $postRepo = $em->getRepository('ObjectsInternJumpBundle:Post');\n\n //Get post\n $post = $postRepo->findOneBy(array('slug' => $slug));\n\n\n return $this->render('ObjectsInternJumpBundle:Internjump:showPost.html.twig', array(\n 'post' => $post,\n ));\n }","title":""},{"docid":"ddc28327288006b3d29c6bdc8761ca44","score":"0.598783","text":"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }","title":""},{"docid":"ddc28327288006b3d29c6bdc8761ca44","score":"0.598783","text":"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }","title":""},{"docid":"3fc6717f13f13fb78e83472976fc5aa9","score":"0.59865093","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('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_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 $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\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":"062227a9dd94ad374ca6ff7a63acf1a7","score":"0.59584326","text":"public function show(Dispenser $dispenser)\n {\n return ( new DispenserResource( $dispenser ) );\n }","title":""},{"docid":"469e3d6c9afd54041becbee857df8ef8","score":"0.5954321","text":"public function edit(Resource $resource)\n {\n //\n }","title":""},{"docid":"469e3d6c9afd54041becbee857df8ef8","score":"0.5954321","text":"public function edit(Resource $resource)\n {\n //\n }","title":""},{"docid":"daadc4514b755545abb9a973d9012f93","score":"0.5950686","text":"public function show(ShowRequest $request, Resource $resource)\n {\n $lastRecord = $resource->records()->orderBy('created_at','DESC')->first();\n\n $lastRecord = $lastRecord ? $lastRecord->created_at->diffForHumans() : 'Nothing recorded';\n\n $cacheKey = \"records.{$resource->id}.\".$request->startDate().\"-\".$request->endDate();\n\n $resource = Cache::remember($cacheKey, config('records.cache_time'), function () use ($request, $resource) {\n return $resource->withRecordsWithinDateRange($request->startDate(), $request->endDate());\n });\n\n $stats = generate_stats_from_records($resource->records);\n\n return view('resources.show', compact('resource', 'stats', 'lastRecord'));\n }","title":""},{"docid":"ea2959468f0e3360f355a0256dc44f05","score":"0.5925876","text":"function display()\n\t{\n\t\t$this->checkVideoAccess();\n\t\t$document\t= JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\n\t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n\t\t$view\t\t= $this->getView( $viewName , '' , $viewType );\n\t\t\n\t\techo $view->get( __FUNCTION__ );\n\t}","title":""},{"docid":"efc877d628950b2a2648f5399003fe71","score":"0.5917996","text":"public function show(Ressource $resource)\n {\n\n return new RessourceR($resource);\n }","title":""},{"docid":"b1ee0604513ee408dcac8ed18b24df7f","score":"0.5912762","text":"public function showResource($name)\n {\n $options = Config::get('laravel-swagger::getResourceOptions');\n $resourceName = \"/\" . str_replace(\"-\", \"/\", $name);\n\n $excludedPath = Config::get('laravel-swagger::excludedPath');\n $swagger = new Swagger($this->getPaths(), $excludedPath);\n\n if (Config::get('laravel-swagger::cache') && Cache::has('resource_'.$resourceName)) {\n $resource = Cache::get('resource_'.$resourceName);\n } else {\n if (!in_array($resourceName, $swagger->getResourceNames())) {\n App::abort(404, 'Resource not found');\n }\n\n // Pet demo uses the main laravel-swagger route.\n if ($resourceName == '/petdemo') {\n $options['defaultBasePath'] = route('swagger-index');\n }\n\n $resource = $swagger->getResource($resourceName, $options);\n }\n\n if (Config::get('laravel-swagger::cache') && !Cache::has('resource_'.$resourceName)) {\n Cache::put('resource_'.$resourceName, $resource, $this->getExpireAt());\n }\n\n return $resource;\n }","title":""},{"docid":"b2c60065169a03f2b724e99c8fee9b74","score":"0.5906451","text":"public function actionShow()\n {\n $this->render('show');\n }","title":""},{"docid":"5fbd8c8a913f3d5a4f08b109b5762881","score":"0.59036547","text":"public function show()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d9715e516ec25a4b15c08b2ae6252c4e","score":"0.58607095","text":"public function showAction()\n {\n $this->writeSession(); // avoid session write timing bug\n\n // Special case: proxy a full URL:\n $proxy = $this->params()->fromQuery('proxy');\n if (!empty($proxy)) {\n return $this->proxyUrl($proxy);\n }\n\n // Default case -- use image loader:\n $this->getLoader()->loadImage(\n // Legacy support for \"isn\" param which has been superseded by isbn:\n $this->params()->fromQuery('isbn', $this->params()->fromQuery('isn')),\n $this->params()->fromQuery('size'),\n $this->params()->fromQuery('contenttype'),\n $this->params()->fromQuery('title'),\n $this->params()->fromQuery('author'),\n $this->params()->fromQuery('callnumber'),\n $this->params()->fromQuery('issn'),\n $this->params()->fromQuery('oclc'),\n $this->params()->fromQuery('upc')\n );\n return $this->displayImage();\n }","title":""},{"docid":"6d542b39d2ff1e3695538d5d13932255","score":"0.58599764","text":"public function controlResource()\n\t{\n\t\t$resourcePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t\n\t\tswitch($resourcePage->get('resourceAction'))\n\t\t{\n\t\t\tcase 'incrementDownloadsCount':\n\t\t\t\t$data=$this->incrementDownloads();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'getResourcePage':\n\t\t\t\t$data=$this->getResourcePage();\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase 'rateResource':\n\t\t\t\t$userSession = \\Utility\\Singleton::getInstance('\\Control\\Session');\n\t\t\t\t\n\t\t\t\tif ($userSession->isLoggedIn())\n\t\t\t\t{\n\t\t\t\t\t$data=$this->rateResource();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tprint 'Error. The user is not logged in but is still trying to rate a resource.';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'getResource_StaticPage':\n\t\t\t\t$resourcePage->assign('templateToDisplay', \"resourcePage.tpl\");\n\t\t\t\t$this->getResourcePage(); // sets the tpl variables ! \n\t\t\t\t$data = $resourcePage->fetch(\"main.tpl\"); // shows the page\n\t\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\treturn $data;\t\t\t\n\t}","title":""},{"docid":"da151f1828a47e20ce9db9b1ce95d89d","score":"0.58439523","text":"public function showTaskResource($id=null) {\n\t\t$this->Evaluation->id = $id;\n\t\tif (!$this->Evaluation->exists()) {\n\t\t\tthrow new NotFoundException(__('Invalid evaluation'));\n\t\t}\n\n\t\t$this->Evaluation->recursive = 2; // also load the article record\n\t\t$this->set('evaluation', $this->Evaluation->read(null, $id));\n\n\t\t$this->layout = 'plain';\n\t}","title":""},{"docid":"6e3b046d6dcd2e90f1b5e167dfd4e8e6","score":"0.5836942","text":"public function show($id_resource)\n {\n try{\n \n $resource =Resource::find($id_resource);\n if (!$resource) {\n return response()->json(['No existe el recurso'],404);\n }\n return response()->json(['datos' => $resource],200);\n\n }catch(\\Exception $e){\n \n Log::critical(\"no esta creado el recurso: {$e->getCode()} , {$e->getLine()} , {$e->getMessage()}\");\n return response('Algo esta mal',500);\n }\n }","title":""},{"docid":"2258aee65ba455bc0aef378f3fccd130","score":"0.5827746","text":"public function edit(Resource $resource)\n {\n return view('resources.edit', compact('resource'));\n }","title":""},{"docid":"d3013ca304fc4179240841ba87242e61","score":"0.582286","text":"public function show($id)\n {\n $employee=Employee::find($id);\n return view('human_resources.show',compact('employee'));\n }","title":""},{"docid":"58526873a63ddff4b306282ce5155a89","score":"0.58138895","text":"public static function output($resource)\r\n\t{\r\n\t\tif (isset(self::$_resources[$resource])) {\r\n\t\t\t$res =& self::$_resources[$resource];\r\n\r\n\t\t\tif (function_exists('getInternalResource') && $data = getInternalResource($res['data'])) {\r\n\t\t\t\t$filename = self::$embedding_file;\r\n\t\t\t} else {\r\n\t\t\t\t$filename = $res['data'];\r\n\t\t\t}\r\n\r\n\t\t\t// use last-modified time as etag; etag must be quoted\r\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\r\n\r\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\r\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\r\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\theader('Etag: ' . $etag);\r\n\r\n\t\t\t// cache file for at most 30 days\r\n\t\t\theader('Cache-control: max-age=2592000');\r\n\r\n\t\t\t// output resource\r\n\t\t\theader('Content-type: ' . $res['mime']);\r\n\r\n\t\t\tif (isset($data)) {\r\n\t\t\t\tif (isset($res['base64'])) {\r\n\t\t\t\t\techo base64_decode($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treadfile($filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}","title":""},{"docid":"772f1899391cdde388ff0797a9ac90ba","score":"0.57871646","text":"public function displayTask()\n\t{\n\t\t// Set the page title\n\t\t$this->_buildTitle(null);\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway(null);\n\n\t\t$this->view\n\t\t\t->set('cloud', new Cloud())\n\t\t\t->set('config', $this->config)\n\t\t\t->display();\n\t}","title":""},{"docid":"e07dd1ea2c7998471ba1119365afd467","score":"0.57825226","text":"private function setShowResource($url, $route, $controller)\n {\n return $this->setResource($url, $route, $controller, 'show');\n }","title":""},{"docid":"58b9e5811b41a6e1eb8525e2193c6ee8","score":"0.57782406","text":"public function show(Information $information)\n\t{\n\t}","title":""},{"docid":"765678d75db620af12e826ffe74dec55","score":"0.57683015","text":"public function display()\n {\n parent::display();\n }","title":""},{"docid":"e7bae91f4e998eac5e73657c932c48d7","score":"0.5752467","text":"public function show($id) {\r\n\t\t//\r\n\t}","title":""},{"docid":"6c8e2d2ef5316837594a71f6d09c8fe4","score":"0.5745173","text":"public function displayTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$resource = Request::getInt('resource', 0);\n\n\t\tif (!$resource)\n\t\t{\n\t\t\techo '
\";\n return null;\n }\n \n if($result->num_rows == 0){\n echo \"No results found
\";\n echo $sql_query;\n return null;\n }\n else {\n echo \"I found \" . $result->num_rows . \" results!\" . \"
\";\n }\n \n $index = 0;\n $users = array();\n \n while($row = $result->fetch_assoc())\n {\n $users[$index] = array($row[\"ID\"], $row[\"FIRST_NAME\"], $row[\"LAST_NAME\"]);\n //array_push($person_array, $person);\n ++$index;\n // echo $sql_query;\n // echo $row[\"ID\"] . \" \" . $row[\"FIRST_NAME\"] . \" \" . $row[\"LAST_NAME\"] . \"
\";\n \n }\n return $users;\n }","title":""},{"docid":"9d9ffddd2e0bb5ca9cfd84d84e30c305","score":"0.52530664","text":"public function getUserName($nameStartsWith){\n\t \n\t\t$records = array();\n $query = $this->db->query(\"SELECT * FROM users WHERE name LIKE '%$nameStartsWith%'\");\n foreach ($query->result() as $row) {\n $datas = array('label' => $row->name, 'id' => $row->id);\n array_push($records, $datas);\n }\n return $records; \n }","title":""},{"docid":"01a341eb7c3a947cfdbe9df1f0aa3df8","score":"0.524666","text":"public function searchUsers($q)\n {\n return DB::table('users')->select('id','name','email')->where('name', 'like', '%'.$q.'%')->get();\n }","title":""},{"docid":"f7c8912198b6bdc71d9f1f21f0be1326","score":"0.52399004","text":"public function searchAssignable($input)\n {\n $users = DB::table('users')->where('email', $input)\n ->orWhere('name', 'like', '%' . $input . '%')->get(['id','name','email','avatar']);\n return $users;\n }","title":""},{"docid":"e7caa50e6b22e74e9139211537c4ca43","score":"0.5228927","text":"public function findLikeName($name, array $options = null)\n\t{\n\t\t$options = isset($options) && is_array($options) ? $options : array();\n\t\t$options['filters'] = isset($options['filters']) && is_array($options['filters']) ? $options['filters'] : array();\n\t\t$options['filters']['name'] = $name;\n\n\t\treturn $this->findAll($options);\n\t}","title":""},{"docid":"5ec64b52ae6ffc6c5742f3d1d1b1ad4d","score":"0.5227425","text":"function findPlayer($player_name){\n\t\ttry {\n\t\t\t$dsn = 'mysql:host=mydbinstance.c1twv2grp5l4.us-west-2.rds.amazonaws.com;port=3306;dbname=players';\n\t\t\t$username = 'minhwebc';\n\t\t\t$password = 'jimnan8987718';\n\t\t\t$dbh = new PDO($dsn, $username, $password);\n\t\t\t$query = \"SELECT * FROM StatsCleaned WHERE Name LIKE ? OR levenshtein(?, `Name`) BETWEEN 0 AND 4;\";\n\t\t\t$params = array(\"%$player_name%\", \"$player_name\");\n\t\t\t$stmt = $dbh->prepare($query);\n\t\t\t$stmt->execute($params);\n\t\t\t$players = $stmt->fetchAll();\n\t\t $dbh = null;\n\t\t $playersResult = array();\n\t\t foreach($players as $player){\n\t\t \t$playersResult[] = new Player($player[\"Name\"], $player[\"Team\"], $player[\"GP\"], $player[\"FG_M\"], $player[\"PPG\"], $player[\"Fname\"], $player[\"Lname\"], $player[\"FT_M\"], $player[\"PF\"]);\n\t\t };\n\t\t return $playersResult;\n\t\t} catch (PDOException $e) {\n\t\t print \"Error!: \" . $e->getMessage() . \"
\";\n\t\t die();\n\t\t}\n\t}","title":""},{"docid":"ac96bcf78c0bed1fe3e6c0e033e30dab","score":"0.5226485","text":"function buscarProfesiones($keyword) {\n\n $db = getDbConnection();\n $stmt = $db->prepare(\"SELECT nombre FROM `servicios` WHERE nombre LIKE ? ORDER BY nombre\");\n $keyword = $keyword . '%';\n $stmt->bindParam(1, $keyword, PDO::PARAM_STR, 100);\n\n $isQueryOk = $stmt->execute();\n\n $results = array();\n\n $results = $stmt->fetchAll(PDO::FETCH_COLUMN);\n\n return $results;\n}","title":""},{"docid":"facb20a8c5f3ada55d7453e2809af534","score":"0.5222061","text":"public static function UsernameSearch($USERNAME){\n\t\t$db = Database::getDB();\n\t\t\n\t\t$query = 'SELECT *\n\t\t\t\t\tFROM members\n\t\t\t\t\tWHERE members.user_name = :username';\n\n $statement = $db->prepare($query);\n $statement->bindValue(\":username\", $USERNAME);\n $statement->execute();\n $row = $statement->fetch();\n $statement->closeCursor();\n\n if ($row != false) {\n $member = new Member(\n $row['memberID'],\n $row['user_name'],\n\t\t\t\t\t\t\t\t\t $row['mbr_password'],\n\t\t\t\t\t\t\t\t\t $row['email'],\n\t\t\t\t\t\t\t\t\t $row['isAdmin'],\n\t\t\t\t\t\t\t\t\t $row['firstName'],\n\t\t\t\t\t\t\t\t\t $row['lastName'],\n\t\t\t\t\t\t\t\t\t $row['birthDate'],\n\t\t\t\t\t\t\t\t\t $row['joinDate']);\n return $member;\n } else {\n return null;\n }\n\t}","title":""},{"docid":"3e9db17a90e9916a1d92bc4ad3115ceb","score":"0.52174246","text":"public function search($name)\n {\n return Product::where('name', 'like', '%'.$name.'%')->get();\n }","title":""},{"docid":"2e44ec708134af4a65ec6ec7e90aec6a","score":"0.52142507","text":"public function search($name)\n {\n return Product::where('name', 'like', '%' . $name . '%')->get();\n }","title":""},{"docid":"172eafc1550c1df66c2dec485a70ee2e","score":"0.5213746","text":"static public function search_member($page, $size, $letter, $keyword)\n {\n global $db;\n $page *= $size;\n $data = Array(\n 'first_name' => $keyword,\n 'last_name' => $keyword,\n );\n $q = \"SELECT * FROM members WHERE members.active = 1 AND (1=2 \";\n foreach ($data as $key => $item) {\n if (!empty($item)) {\n $q .= \" OR \" . $key . \" LIKE \" . \"'%\" . $item . \"%' \";\n }\n }\n $q .= \")\";\n if (!empty($letter)) {\n $q .= \" AND first_name LIKE '\" . $letter . \"%' \";\n };\n $q_with_paging = $q . \" LIMIT {$page} , {$size}\";\n\n $papers = $db->withTotalCount()->rawQuery($q_with_paging);\n if (!empty($papers)) {\n if ($db->count) {\n return $papers;\n } else {\n return -99;\n\n }\n } else {\n return [];\n }\n }","title":""},{"docid":"7e46508265fb173e4edab197cc552230","score":"0.5212118","text":"public function search($name){\n return Product::where('name', 'like', '%'.$name.'%')->get();\n }","title":""},{"docid":"0f9315ce0e27fe568506820573dfcbf2","score":"0.5209326","text":"function searchDB($column, $search) {\r\n $db = dbconnect();\r\n\r\n $stmt = $db->prepare(\"SELECT * FROM corps WHERE $column LIKE :search\");\r\n\r\n $search = '%' . $search . '%';\r\n $binds = array(\r\n \":search\" => $search\r\n );\r\n $results = array();\r\n if ($stmt->execute($binds) && $stmt->rowCount() > 0) {\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n return $results;\r\n}","title":""},{"docid":"86312b185bb27850e1a842983d221dde","score":"0.5207136","text":"public function getSearchedAdmins($keyword) {\n\t\t$this->db->like('name', $keyword);\n\t\treturn $this->db->get('admin')->result_array();\n\t}","title":""},{"docid":"20eeaa12e8f7ee362e2e7a890188aa26","score":"0.52060276","text":"function search($pdo, $term) {\n\n $wildcard = \"%\" . $term . \"%\"; \n $sql = \"SELECT * FROM disc INNER JOIN file ON disc.id=file.disc_id\"; \n $sql .= \" WHERE file.dir LIKE '\" . $wildcard . \"'\"; \n $sql .= \" OR disc.label LIKE '\" . $wildcard . \"'\"; \n $sql .= \" OR file.name LIKE '\" . $wildcard . \"';\"; \n \n return $pdo->query($sql);\n}","title":""},{"docid":"b5df20b0b52e619dd082e20b3c2dc7e8","score":"0.51942647","text":"public function search($keyword) {\n\t\tif (empty($keyword)) {\n\t\t\tthrow new NullPointerException(\"keyword\");\n\t\t}\n\t\t$keywords = preg_split('/ /', $keyword);\n\t\t$conditions = \"\";\n\t\tforeach ($keywords AS $word) {\n\t\t\tif (!empty($conditions)) {\n\t\t\t\t$conditions .= \" AND \";\n\t\t\t}\n\t\t\t$word = \"%\" . mysql_escape_string($word) . \"%\";\n\t\t\t$conditions .= \"\n\t\t\t([first_name] LIKE '$word' OR\n\t\t\t[last_name] LIKE '$word' OR\n\t\t\t[group_name] LIKE '$word')\";\n\t\t}\n\t\treturn dibi::dataSource(\"SELECT * FROM [view_author] \" . (empty($conditions) ? \"\" : \" WHERE \" . $conditions) . \" GROUP BY [id_author]\");\n\t}","title":""},{"docid":"9f8c2ae855f86446a973868cbe1a6f18","score":"0.5179176","text":"function get_restaurant_ids_from_pattern($pattern) {\r\n return get_array(\"SELECT * \r\n FROM Restaurants \r\n WHERE restaurantName LIKE '%$pattern%'\");\r\n}","title":""},{"docid":"e2386a3709dfbbbe483a5c626e241430","score":"0.5167199","text":"static function search($search_name)\n {\n $found_user = NULL;\n $users = User::getAll();\n foreach($users as $user) {\n $user_name = $user->getName();\n if($user_name == $search_name) {\n $found_user = $user;\n }\n }\n return $found_user;\n }","title":""},{"docid":"6fab32a3e76a7c2df24ea08a26a4d7fe","score":"0.5159962","text":"public function search($input) {\n if($input == null) {\n $query = $this->db->get('videos');\n return $query->result_array();\n }\n $query = $this->db->query('SELECT videoID, username, thumbnail, title, des\n FROM videos\n WHERE title LIKE \"%'.$input.'%\"\n OR username LIKE \"%'.$input.'%\"\n ');\n return $query->result_array();\n }","title":""},{"docid":"a2779ae97859ee930d5ef0615117044f","score":"0.51456606","text":"public function getUsersByPartOfName($partOfName)\n {\n //create query which is like this one: select * from users where cat(firstName,\" \" ,lastName) like %partOfName%\n $queryBuilder = $this->createQueryBuilder('u');\n $queryBuilder\n ->select('u')\n ->where($queryBuilder->expr()->like(\n $queryBuilder->expr()->concat(\n 'u.firstName',\n $queryBuilder->expr()->concat($queryBuilder->expr()->literal(' '), 'u.lastName')\n ),\n $queryBuilder->expr()->literal('%' . $partOfName. '%')\n ))\n ->setMaxResults(10);\n ;\n $query = $queryBuilder->getQuery();\n $result = $query->execute();\n return $result;\n }","title":""},{"docid":"e3666de524c9f3f68789418f699efcd2","score":"0.51429385","text":"function wildCardSearchBefore($f){\n $db = new ConnectDB();\n \n $sql_query = \"SELECT ID, FIRST_NAME, LAST_NAME FROM users WHERE FIRST_NAME LIKE '%$f'\";\n \n $connection = $db->getConnection();\n \n $result = $connection->query($sql_query);\n \n if(!$result){\n echo \"assume the SQL statement has an error
\";\n return null;\n }\n \n if($result->num_rows == 0){\n echo \"No results found
\";\n echo $sql_query;\n return null;\n }\n else {\n echo \"I found \" . $result->num_rows . \" results!\" . \"
\";\n }\n \n $index = 0;\n $users = array();\n \n while($row = $result->fetch_assoc())\n {\n $users[$index] = array($row[\"ID\"], $row[\"FIRST_NAME\"], $row[\"LAST_NAME\"]);\n //array_push($person_array, $person);\n ++$index;\n // echo $sql_query;\n // echo $row[\"ID\"] . \" \" . $row[\"FIRST_NAME\"] . \" \" . $row[\"LAST_NAME\"] . \"
\";\n \n }\n return $users;\n }","title":""},{"docid":"08a72f6f2b3fa121834bb188cc128629","score":"0.5140654","text":"function SearchUsers($dbh, $username) {\n try\n {\n\t//selecting the usernames of undeleted useres that have a name\n\t//similar to the string provided\n\t$query = \"SELECT username \" .\n\t\t \"FROM Users \" .\n\t\t \"WHERE user_deleted = 0 AND user_id > 1 AND username like \" .\n\t\t \"CONCAT('%', :username, '%') \" .\n\t\t \"ORDER BY username ASC \";\n\t$stmt = $dbh->prepare($query);\n\t//binding params\n\t$stmt->bindValue('username', $username);\n\t$stmt->execute();\n\t$result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\t$howmany = count($result);\n\t//return 0 if no match found\n\tif ($howmany < 1) {\n\t\t$result = 0;\n\t}\n }\n catch (PDOException $e) {\n die('PDO error getting recent posts: ' . $e->getMessage());\n }\n return $result;\n}","title":""},{"docid":"a87c7ef2d1a429c3fea8e0fc21581bf5","score":"0.51356876","text":"function sql_find_like()\n\t{\n\t\treturn \"SHOW tables LIKE '\".ee()->db->escape_like_str($this->userdata['db_prefix']).\"%'\";\n\t}","title":""},{"docid":"69d5353ccca9cecf23240f00e96cf355","score":"0.513257","text":"function findByFirstName($n){\n $db = new ConnectDB();\n \n $connection = $db->getConnection();\n \n $stmt = $connection->prepare(\"SELECT ID, FirstName, LastName, username, password, Role, email FROM users WHERE FirstName LIKE ?\");\n $like_n = \"%\" . $n . \"%\";\n $stmt->bind_param(\"s\", $like_n);\n $stmt->execute();\n \n $result = $stmt->get_result();\n\n if(!$result){\n echo \"assume the SQL statement has an error
\";\n return null;\n exit;\n }\n \n if($result->num_rows == 0){\n return null;\n }\n else {\n echo \"I found \" . $result->num_rows . \" results!\" . \"
\";\n }\n \n $index = 0;\n $users = array();\n \n while($row = $result->fetch_assoc())\n {\n $users[$index] = array($row[\"ID\"], $row[\"FirstName\"], $row[\"LastName\"], \n $row[\"username\"], $row[\"password\"], $row[\"Role\"], $row[\"email\"]);\n\n ++$index;\n \n }\n return $users;\n }","title":""},{"docid":"8ba55aa1c84c5df4f08dd0e00c35ca19","score":"0.5131118","text":"function search($field,$find){\r\n $con = connectToDB();\r\n $query = \"\";\r\n $result = NULL;\r\n if($con!=NULL){ \r\n\t\t\r\n $query =\"SELECT A.ID, B.Fname, B.Lname, B.Email, A.Title, A.Authors, A.Article, A.Journal, A.PubDate, A.Description, A.Picture, A.Video FROM video A, user B WHERE A.UserID = B.UID AND UPPER($field) like '%{$find}%'\" ;\r\n if(!($result = mysqli_query($con,$query))){\r\n mysqli_close($con);\r\n\r\n return NULL;\r\n }\r\n else{\r\n\t\t\t\t\t\t$rows = array();\r\n\t\t\t\t\twhile($row = mysqli_fetch_row($result)){\r\n\t\t\t\t\t\t $rows[] = $row;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmysqli_free_result($result);\r\n\t\t\t\t\t\tmysqli_close($con);\r\n\t\t\t\t\t\treturn $rows;\r\n \t }\r\n }\r\n else{\r\n return NULL;\r\n }\r\n \r\n }","title":""},{"docid":"b5a06eebbcf47bab5d547f373d7f8ecc","score":"0.5129445","text":"public function findPersonByName($name) {\n $sql = \"SELECT id, name, surname, email, comment \n FROM person \n WHERE name like :name\";\n\n // Valmistellaan lause\n if (! $stmt = $this->connection->prepare ( $sql ))\n throw new Exception ( $virhelista [8], 8 );\n\n // Laita parametrit\n $nm = \"%\" . utf8_decode ( $name ) . \"%\";\n $stmt->bindValue ( \":name\", $nm );\n\n // Aja lauseke\n if (! $stmt->execute ())\n throw new Exception ( $virhelista [8], 8 );\n\n // Käsittele hakulausekkeen tulos\n $result = array ();\n while ( $row = $stmt->fetchObject () ) {\n $person = new Person ();\n\n $person->setId($row->id);\n $person->setName(utf8_encode($row->name));\n $person->setSurname(utf8_encode($row->surname));\n $person->setEmail(utf8_encode($row->email));\n $person->setComment(utf8_encode($row->comment));\n\n\n // Laitetaan olio tulos taulukkoon (olio-taulukkoon)\n $result [] = $person;\n }\n\n $this->count = $stmt->rowCount ();\n\n return $result;\n }","title":""},{"docid":"3312f5d0f751defd16f1030b1c87603f","score":"0.5120818","text":"function findByFirstName($name)\n {\n $db = new Database();\n \n // Query\n $sql_query = \"SELECT * FROM USERS WHERE FIRST_NAME LIKE '%$name%'\";\n \n // Connection to db\n $connection = $db->getConnection();\n \n // Result from db query\n $result = $connection->query($sql_query);\n \n // This checks to make sure SQL statement is correct\n if(!$result)\n {\n echo \"Something might be wrong with SQL statement\";\n return null;\n exit;\n }\n \n // This looks for results and returns data\n if ($result->num_rows == 0)\n {\n // echo \"No rows found
\";\n return null;\n }\n else\n {\n $userArray = array();\n \n // Loop through results and print data\n while ($user = $result->fetch_assoc())\n {\n // Adds results to an array for use elsewhere\n array_push($userArray, $user);\n }\n return $userArray;\n }\n }","title":""},{"docid":"2353ab34ef5e18cb733589d70553b660","score":"0.5115216","text":"public function matchUser($queryString)\n {\n $query =\"SELECT username FROM user WHERE username LIKE '{$queryString}%'\";\n $stmt = $this->connection->prepare($query);\n $stmt->execute();\n return $stmt;\n }","title":""},{"docid":"52da2c7e555d8b5f01fbac34700459d0","score":"0.5107274","text":"public function searchByName()\n\t{\t\n\t\t$name = $this->f3->get('PARAMS.name');\n\t\t$this->setData($this->User->searchByName($name));\n\t}","title":""},{"docid":"4796c8206e684534394f0877de036eb1","score":"0.5101251","text":"static function showAllSearchUser($start , $limit, $searchUserName)\n {\n try\n {\n // $pieces = explode(' ', $searchUserName);\n // $firstName = @$pieces[0];\n // $lastName = @$pieces[1];\n $db = DB::getConnect();\n // $db->setAttribute(PDO::ATTR_EMULATE_PREPARES,true); \n $reg = 'SELECT personne_Id as u_id, personne_Nom as u_firstname, personne_Prenom as u_lastname,u.utilisateur_Bloque as u_banned, u.utilisateur_EMail as u_email , u.utilisateur_Password as password, u.utilisateur_DateCreation as u_date_registered , l.level_Nom as u_rank , l.level_Id as u_rank_id FROM personne p INNER JOIN utilisateur u ON u.utilisateur_Id = p.personne_Id INNER JOIN `level` l ON l.level_Id = u.level_Id WHERE :searchName LIKE Concat(Concat(\\'%\\',personne_Nom),\\'%\\') OR :searchName LIKE Concat(Concat(\\'%\\',personne_Prenom),\\'%\\') LIMIT :start, :limit';\n $st = $db->prepare($reg);\n $st->bindValue(':start', $start, PDO::PARAM_INT);\n $st->bindValue(':limit', $limit, PDO::PARAM_INT);\n $st->bindValue(':searchName', $searchUserName, PDO::PARAM_STR);\n // $st->bindValue(':searchLastName', '%'.$lastName.'%', PDO::PARAM_STR);\n $st->execute();\n $result = $st->fetchAll(PDO::FETCH_CLASS, 'User');\n return $result;\n }\n catch (PDOException $e) \n {\n $e->getMessage(); \n } \n }","title":""},{"docid":"1f26b81294a838817c31c6de49fb82fa","score":"0.50924814","text":"public function member()\n\t{\n\t\t// Escape the search string\n\t\t$this->_search = strtr($this->_search, array('%' => '\\%', '_' => '\\_', '*' => '%', '?' => '_', '&' => '&'));\n\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t// Find the member.\n\t\treturn getMember($this->_search, !empty($this->_params['buddies']) ? User::$info->buddies : array());\n\t}","title":""},{"docid":"229c2ec17aebbf7dd65273465c62ef83","score":"0.5089021","text":"function get_restaurant_details_from_pattern($pattern) {\r\n return get_array(\"SELECT * \r\n FROM Restaurants\r\n WHERE restaurantName LIKE '%$pattern%'\");\r\n}","title":""},{"docid":"d122ff101c1c23dd5b808f895dcb027e","score":"0.5083844","text":"public function getList($name = null, $limit = 10)\n {\n $result = $this->createQueryBuilder('m')\n ->where('m.name LIKE :name')\n ->setParameter('name', '%' . $name . '%')\n ->setMaxResults($limit)\n ->getQuery()->execute();\n \n return $result;\n }","title":""},{"docid":"db3bb559a3575eb5cbbc73c03a6ccf8c","score":"0.5077002","text":"function phorum_db_search_users($search)\n{\n $PHORUM = $GLOBALS[\"PHORUM\"];\n\n $conn = phorum_db_mysql_connect();\n\n $users = array();\n\n $search = trim($search);\n\n $sql = \"select user_id, username, email from {$PHORUM['user_table']} where username like '%$search%' or email like '%$search%'order by username\";\n\n $res = mysql_query($sql, $conn);\n if ($err = mysql_error()) phorum_db_mysql_error(\"$err: $sql\");\n\n if (mysql_num_rows($res)){\n while ($user = mysql_fetch_assoc($res)){\n $users[$user[\"user_id\"]] = $user;\n }\n }\n\n return $users;\n}","title":""},{"docid":"33e7571d519470f5eaffa7d39330ca27","score":"0.507421","text":"function getByWildcard($search) {\n $prep_search = '%' . $search . '%'; //prepare the text $search so it will be a wildcard param\n if (is_numeric($search)) { //if $search is numeric also search the id field\n $sql = \"SELECT distinct(u.id), u.* FROM users u WHERE f_name LIKE ? OR l_name LIKE ? OR nick LIKE ? OR email LIKE ? OR id = ? ORDER BY id DESC LIMIT 20\";\n $query = $this->db->query($sql, array($prep_search, $prep_search, $prep_search, $prep_search, $search));\n } else {\n $sql = \"SELECT distinct(u.id), u.* FROM users u WHERE f_name LIKE ? OR l_name LIKE ? OR nick LIKE ? OR email LIKE ? ORDER BY id DESC LIMIT 20\";\n $query = $this->db->query($sql, array($prep_search, $prep_search, $prep_search, $prep_search));\n }\n //echo $this->db->last_query();\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $data[] = $row;\n }\n return $data;\n } else {\n return -1;\n }\n }","title":""},{"docid":"a752a4964035330fcff630783df1d512","score":"0.5074176","text":"function displayResults($input)\r\n {\r\n //1. Define the query\r\n $sql = \"SELECT * FROM student WHERE first_name LIKE '%$input%' OR last_name LIKE '%$input%' ORDER BY first_name ASC\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //3. Bind the parameters - SKIP\r\n\r\n //4. Execute the statement\r\n $statement->execute();\r\n\r\n //5. Process the results\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n return $result;\r\n }","title":""},{"docid":"dcb4d35efae05e30dfda0974edf9d3a2","score":"0.50668037","text":"public function searchByName($name, $languageId);","title":""},{"docid":"65a850db6f5d5a28ada0ca085b2563b8","score":"0.5065772","text":"protected function search() {\n\t\t$this->matches = array();\n\t\t$sql = \"SELECT\t\tuser.userID\n\t\t\tFROM\t\twcf\".WCF_N.\"_user user\n\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_option_value option_value \n\t\t\tON\t\t(option_value.userID = user.userID)\";\n\t\t\n\t\t// build search condition\n\t\t$this->conditions = new ConditionBuilder(); \n\t\t\n\t\t// static fields\n\t\t$this->buildStaticConditions();\n\t\t\n\t\t// dynamic fields\n\t\t$this->buildDynamicConditions();\n\t\t\n\t\t// call buildConditions event\n\t\tEventHandler::fireAction($this, 'buildConditions');\n\n\t\t// do search\n\t\t$result = WCF::getDB()->sendQuery($sql.$this->conditions->get(), $this->maxResults);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$this->matches[] = $row['userID'];\t\n\t\t}\n\t}","title":""},{"docid":"62bb4ed24e3a7ff4c328c9d6fed7d220","score":"0.50594723","text":"public function findByName($name);","title":""},{"docid":"62bb4ed24e3a7ff4c328c9d6fed7d220","score":"0.50594723","text":"public function findByName($name);","title":""},{"docid":"62bb4ed24e3a7ff4c328c9d6fed7d220","score":"0.50594723","text":"public function findByName($name);","title":""},{"docid":"62bb4ed24e3a7ff4c328c9d6fed7d220","score":"0.50594723","text":"public function findByName($name);","title":""},{"docid":"ec5177ee587863ac5d360cdbdcbaa34b","score":"0.5059028","text":"function paging_member_where($where,$idpaket,$carimember){\n\t\t$this->db->where($where);\n\t\tif (!empty($idpaket)) {\n\t\t\t$this->db->where('paket', $idpaket);\n\t\t}\n\t\tif (!empty($carimember)) {\n\t\t\t$this->db->like('nama', $carimember);\n\t\t}\n\t\treturn $this->db->get('user');\n\t}","title":""},{"docid":"1fa52d604ca985c93ae67f5c2e726504","score":"0.5056917","text":"function searchUsers($text=false){\n\t\t$filter=false;\n\t\tif($text!=false){\n\t\t\t$filter=\" FirstName like '$text' or LastName like '$text' \";\n\t\t}\n\t\t\n\t\treturn $this->getUsers($filter);\n\t}","title":""},{"docid":"b0b88ebb0afa015c7b0b019c20c02f03","score":"0.505056","text":"function search($keywords){\r\n\t\t$query = \"SELECT c.customerID, c.firstName, c.lastName, c.username, \r\n c.country, c.region, c.city, c.address FROM \" . $this->table_name . \" c WHERE \r\n\t\tc.customerID LIKE ? OR c.firstName LIKE ? OR c.lastName LIKE ? OR c.username LIKE ? \r\n\t\tOR c.country LIKE ? OR c.region LIKE ? OR c.city LIKE ? OR c.address LIKE ?\";\r\n\t\t//Preparar Statement\r\n\t\t$stmt = $this->conn->prepare($query);\r\n\t\t// Saneamos\r\n\t\t$keywords=htmlspecialchars(strip_tags($keywords));\r\n \t\t$keywords = \"%{$keywords}%\";\r\n\t\t// Bind los parametors\r\n\t\t$stmt->bindParam(1, $keywords);\r\n \t\t$stmt->bindParam(2, $keywords);\r\n \t\t$stmt->bindParam(3, $keywords);\r\n\t\t$stmt->bindParam(4, $keywords);\r\n \t\t$stmt->bindParam(5, $keywords);\r\n \t\t$stmt->bindParam(6, $keywords);\r\n\t\t$stmt->bindParam(7, $keywords);\r\n \t\t$stmt->bindParam(8, $keywords);\r\n \t\t// execute query\r\n \t\t$stmt->execute();\r\n\t\treturn $stmt;\r\n\t}","title":""},{"docid":"79363bf681497d8a02540b125cc3340e","score":"0.5033661","text":"function search($text){\n\t\n\t// connection to the Ddatabase\n\t$db = new PDO(\"mysql:host=localhost;dbname=english\", 'root', '');\n\t// let's filter the data that comes in\n\t$text = htmlspecialchars($text);\n\t// prepare the mysql query to select the users \n\t$get_word = $db->prepare(\"SELECT word FROM words WHERE word LIKE concat('%', :word, '%')\");\n\t// execute the query\n\t$get_word -> execute(array('word' => $text));\n\t// show the users on the page\n\twhile($words = $get_word->fetch(PDO::FETCH_ASSOC)){\n\t\t// show each user as a link\n\t\techo '
\\\";\\n return null;\\n }\\n \\n if($result->num_rows == 0){\\n echo \\\"No results found
\\\";\\n echo $sql_query;\\n return null;\\n }\\n else {\\n echo \\\"I found \\\" . $result->num_rows . \\\" results!\\\" . \\\"
\\\";\\n }\\n \\n $index = 0;\\n $users = array();\\n \\n while($row = $result->fetch_assoc())\\n {\\n $users[$index] = array($row[\\\"ID\\\"], $row[\\\"FIRST_NAME\\\"], $row[\\\"LAST_NAME\\\"]);\\n //array_push($person_array, $person);\\n ++$index;\\n // echo $sql_query;\\n // echo $row[\\\"ID\\\"] . \\\" \\\" . $row[\\\"FIRST_NAME\\\"] . \\\" \\\" . $row[\\\"LAST_NAME\\\"] . \\\"
\\\";\\n \\n }\\n return $users;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d9ffddd2e0bb5ca9cfd84d84e30c305\",\n \"score\": \"0.52530664\",\n \"text\": \"public function getUserName($nameStartsWith){\\n\\t \\n\\t\\t$records = array();\\n $query = $this->db->query(\\\"SELECT * FROM users WHERE name LIKE '%$nameStartsWith%'\\\");\\n foreach ($query->result() as $row) {\\n $datas = array('label' => $row->name, 'id' => $row->id);\\n array_push($records, $datas);\\n }\\n return $records; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01a341eb7c3a947cfdbe9df1f0aa3df8\",\n \"score\": \"0.524666\",\n \"text\": \"public function searchUsers($q)\\n {\\n return DB::table('users')->select('id','name','email')->where('name', 'like', '%'.$q.'%')->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7c8912198b6bdc71d9f1f21f0be1326\",\n \"score\": \"0.52399004\",\n \"text\": \"public function searchAssignable($input)\\n {\\n $users = DB::table('users')->where('email', $input)\\n ->orWhere('name', 'like', '%' . $input . '%')->get(['id','name','email','avatar']);\\n return $users;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7caa50e6b22e74e9139211537c4ca43\",\n \"score\": \"0.5228927\",\n \"text\": \"public function findLikeName($name, array $options = null)\\n\\t{\\n\\t\\t$options = isset($options) && is_array($options) ? $options : array();\\n\\t\\t$options['filters'] = isset($options['filters']) && is_array($options['filters']) ? $options['filters'] : array();\\n\\t\\t$options['filters']['name'] = $name;\\n\\n\\t\\treturn $this->findAll($options);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ec64b52ae6ffc6c5742f3d1d1b1ad4d\",\n \"score\": \"0.5227425\",\n \"text\": \"function findPlayer($player_name){\\n\\t\\ttry {\\n\\t\\t\\t$dsn = 'mysql:host=mydbinstance.c1twv2grp5l4.us-west-2.rds.amazonaws.com;port=3306;dbname=players';\\n\\t\\t\\t$username = 'minhwebc';\\n\\t\\t\\t$password = 'jimnan8987718';\\n\\t\\t\\t$dbh = new PDO($dsn, $username, $password);\\n\\t\\t\\t$query = \\\"SELECT * FROM StatsCleaned WHERE Name LIKE ? OR levenshtein(?, `Name`) BETWEEN 0 AND 4;\\\";\\n\\t\\t\\t$params = array(\\\"%$player_name%\\\", \\\"$player_name\\\");\\n\\t\\t\\t$stmt = $dbh->prepare($query);\\n\\t\\t\\t$stmt->execute($params);\\n\\t\\t\\t$players = $stmt->fetchAll();\\n\\t\\t $dbh = null;\\n\\t\\t $playersResult = array();\\n\\t\\t foreach($players as $player){\\n\\t\\t \\t$playersResult[] = new Player($player[\\\"Name\\\"], $player[\\\"Team\\\"], $player[\\\"GP\\\"], $player[\\\"FG_M\\\"], $player[\\\"PPG\\\"], $player[\\\"Fname\\\"], $player[\\\"Lname\\\"], $player[\\\"FT_M\\\"], $player[\\\"PF\\\"]);\\n\\t\\t };\\n\\t\\t return $playersResult;\\n\\t\\t} catch (PDOException $e) {\\n\\t\\t print \\\"Error!: \\\" . $e->getMessage() . \\\"
\\\";\\n\\t\\t die();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac96bcf78c0bed1fe3e6c0e033e30dab\",\n \"score\": \"0.5226485\",\n \"text\": \"function buscarProfesiones($keyword) {\\n\\n $db = getDbConnection();\\n $stmt = $db->prepare(\\\"SELECT nombre FROM `servicios` WHERE nombre LIKE ? ORDER BY nombre\\\");\\n $keyword = $keyword . '%';\\n $stmt->bindParam(1, $keyword, PDO::PARAM_STR, 100);\\n\\n $isQueryOk = $stmt->execute();\\n\\n $results = array();\\n\\n $results = $stmt->fetchAll(PDO::FETCH_COLUMN);\\n\\n return $results;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"facb20a8c5f3ada55d7453e2809af534\",\n \"score\": \"0.5222061\",\n \"text\": \"public static function UsernameSearch($USERNAME){\\n\\t\\t$db = Database::getDB();\\n\\t\\t\\n\\t\\t$query = 'SELECT *\\n\\t\\t\\t\\t\\tFROM members\\n\\t\\t\\t\\t\\tWHERE members.user_name = :username';\\n\\n $statement = $db->prepare($query);\\n $statement->bindValue(\\\":username\\\", $USERNAME);\\n $statement->execute();\\n $row = $statement->fetch();\\n $statement->closeCursor();\\n\\n if ($row != false) {\\n $member = new Member(\\n $row['memberID'],\\n $row['user_name'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['mbr_password'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['email'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['isAdmin'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['firstName'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['lastName'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['birthDate'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t $row['joinDate']);\\n return $member;\\n } else {\\n return null;\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e9db17a90e9916a1d92bc4ad3115ceb\",\n \"score\": \"0.52174246\",\n \"text\": \"public function search($name)\\n {\\n return Product::where('name', 'like', '%'.$name.'%')->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e44ec708134af4a65ec6ec7e90aec6a\",\n \"score\": \"0.52142507\",\n \"text\": \"public function search($name)\\n {\\n return Product::where('name', 'like', '%' . $name . '%')->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"172eafc1550c1df66c2dec485a70ee2e\",\n \"score\": \"0.5213746\",\n \"text\": \"static public function search_member($page, $size, $letter, $keyword)\\n {\\n global $db;\\n $page *= $size;\\n $data = Array(\\n 'first_name' => $keyword,\\n 'last_name' => $keyword,\\n );\\n $q = \\\"SELECT * FROM members WHERE members.active = 1 AND (1=2 \\\";\\n foreach ($data as $key => $item) {\\n if (!empty($item)) {\\n $q .= \\\" OR \\\" . $key . \\\" LIKE \\\" . \\\"'%\\\" . $item . \\\"%' \\\";\\n }\\n }\\n $q .= \\\")\\\";\\n if (!empty($letter)) {\\n $q .= \\\" AND first_name LIKE '\\\" . $letter . \\\"%' \\\";\\n };\\n $q_with_paging = $q . \\\" LIMIT {$page} , {$size}\\\";\\n\\n $papers = $db->withTotalCount()->rawQuery($q_with_paging);\\n if (!empty($papers)) {\\n if ($db->count) {\\n return $papers;\\n } else {\\n return -99;\\n\\n }\\n } else {\\n return [];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e46508265fb173e4edab197cc552230\",\n \"score\": \"0.5212118\",\n \"text\": \"public function search($name){\\n return Product::where('name', 'like', '%'.$name.'%')->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f9315ce0e27fe568506820573dfcbf2\",\n \"score\": \"0.5209326\",\n \"text\": \"function searchDB($column, $search) {\\r\\n $db = dbconnect();\\r\\n\\r\\n $stmt = $db->prepare(\\\"SELECT * FROM corps WHERE $column LIKE :search\\\");\\r\\n\\r\\n $search = '%' . $search . '%';\\r\\n $binds = array(\\r\\n \\\":search\\\" => $search\\r\\n );\\r\\n $results = array();\\r\\n if ($stmt->execute($binds) && $stmt->rowCount() > 0) {\\r\\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\\r\\n }\\r\\n return $results;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86312b185bb27850e1a842983d221dde\",\n \"score\": \"0.5207136\",\n \"text\": \"public function getSearchedAdmins($keyword) {\\n\\t\\t$this->db->like('name', $keyword);\\n\\t\\treturn $this->db->get('admin')->result_array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20eeaa12e8f7ee362e2e7a890188aa26\",\n \"score\": \"0.52060276\",\n \"text\": \"function search($pdo, $term) {\\n\\n $wildcard = \\\"%\\\" . $term . \\\"%\\\"; \\n $sql = \\\"SELECT * FROM disc INNER JOIN file ON disc.id=file.disc_id\\\"; \\n $sql .= \\\" WHERE file.dir LIKE '\\\" . $wildcard . \\\"'\\\"; \\n $sql .= \\\" OR disc.label LIKE '\\\" . $wildcard . \\\"'\\\"; \\n $sql .= \\\" OR file.name LIKE '\\\" . $wildcard . \\\"';\\\"; \\n \\n return $pdo->query($sql);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5df20b0b52e619dd082e20b3c2dc7e8\",\n \"score\": \"0.51942647\",\n \"text\": \"public function search($keyword) {\\n\\t\\tif (empty($keyword)) {\\n\\t\\t\\tthrow new NullPointerException(\\\"keyword\\\");\\n\\t\\t}\\n\\t\\t$keywords = preg_split('/ /', $keyword);\\n\\t\\t$conditions = \\\"\\\";\\n\\t\\tforeach ($keywords AS $word) {\\n\\t\\t\\tif (!empty($conditions)) {\\n\\t\\t\\t\\t$conditions .= \\\" AND \\\";\\n\\t\\t\\t}\\n\\t\\t\\t$word = \\\"%\\\" . mysql_escape_string($word) . \\\"%\\\";\\n\\t\\t\\t$conditions .= \\\"\\n\\t\\t\\t([first_name] LIKE '$word' OR\\n\\t\\t\\t[last_name] LIKE '$word' OR\\n\\t\\t\\t[group_name] LIKE '$word')\\\";\\n\\t\\t}\\n\\t\\treturn dibi::dataSource(\\\"SELECT * FROM [view_author] \\\" . (empty($conditions) ? \\\"\\\" : \\\" WHERE \\\" . $conditions) . \\\" GROUP BY [id_author]\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f8c2ae855f86446a973868cbe1a6f18\",\n \"score\": \"0.5179176\",\n \"text\": \"function get_restaurant_ids_from_pattern($pattern) {\\r\\n return get_array(\\\"SELECT * \\r\\n FROM Restaurants \\r\\n WHERE restaurantName LIKE '%$pattern%'\\\");\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2386a3709dfbbbe483a5c626e241430\",\n \"score\": \"0.5167199\",\n \"text\": \"static function search($search_name)\\n {\\n $found_user = NULL;\\n $users = User::getAll();\\n foreach($users as $user) {\\n $user_name = $user->getName();\\n if($user_name == $search_name) {\\n $found_user = $user;\\n }\\n }\\n return $found_user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fab32a3e76a7c2df24ea08a26a4d7fe\",\n \"score\": \"0.5159962\",\n \"text\": \"public function search($input) {\\n if($input == null) {\\n $query = $this->db->get('videos');\\n return $query->result_array();\\n }\\n $query = $this->db->query('SELECT videoID, username, thumbnail, title, des\\n FROM videos\\n WHERE title LIKE \\\"%'.$input.'%\\\"\\n OR username LIKE \\\"%'.$input.'%\\\"\\n ');\\n return $query->result_array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2779ae97859ee930d5ef0615117044f\",\n \"score\": \"0.51456606\",\n \"text\": \"public function getUsersByPartOfName($partOfName)\\n {\\n //create query which is like this one: select * from users where cat(firstName,\\\" \\\" ,lastName) like %partOfName%\\n $queryBuilder = $this->createQueryBuilder('u');\\n $queryBuilder\\n ->select('u')\\n ->where($queryBuilder->expr()->like(\\n $queryBuilder->expr()->concat(\\n 'u.firstName',\\n $queryBuilder->expr()->concat($queryBuilder->expr()->literal(' '), 'u.lastName')\\n ),\\n $queryBuilder->expr()->literal('%' . $partOfName. '%')\\n ))\\n ->setMaxResults(10);\\n ;\\n $query = $queryBuilder->getQuery();\\n $result = $query->execute();\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3666de524c9f3f68789418f699efcd2\",\n \"score\": \"0.51429385\",\n \"text\": \"function wildCardSearchBefore($f){\\n $db = new ConnectDB();\\n \\n $sql_query = \\\"SELECT ID, FIRST_NAME, LAST_NAME FROM users WHERE FIRST_NAME LIKE '%$f'\\\";\\n \\n $connection = $db->getConnection();\\n \\n $result = $connection->query($sql_query);\\n \\n if(!$result){\\n echo \\\"assume the SQL statement has an error
\\\";\\n return null;\\n }\\n \\n if($result->num_rows == 0){\\n echo \\\"No results found
\\\";\\n echo $sql_query;\\n return null;\\n }\\n else {\\n echo \\\"I found \\\" . $result->num_rows . \\\" results!\\\" . \\\"
\\\";\\n }\\n \\n $index = 0;\\n $users = array();\\n \\n while($row = $result->fetch_assoc())\\n {\\n $users[$index] = array($row[\\\"ID\\\"], $row[\\\"FIRST_NAME\\\"], $row[\\\"LAST_NAME\\\"]);\\n //array_push($person_array, $person);\\n ++$index;\\n // echo $sql_query;\\n // echo $row[\\\"ID\\\"] . \\\" \\\" . $row[\\\"FIRST_NAME\\\"] . \\\" \\\" . $row[\\\"LAST_NAME\\\"] . \\\"
\\\";\\n \\n }\\n return $users;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a72f6f2b3fa121834bb188cc128629\",\n \"score\": \"0.5140654\",\n \"text\": \"function SearchUsers($dbh, $username) {\\n try\\n {\\n\\t//selecting the usernames of undeleted useres that have a name\\n\\t//similar to the string provided\\n\\t$query = \\\"SELECT username \\\" .\\n\\t\\t \\\"FROM Users \\\" .\\n\\t\\t \\\"WHERE user_deleted = 0 AND user_id > 1 AND username like \\\" .\\n\\t\\t \\\"CONCAT('%', :username, '%') \\\" .\\n\\t\\t \\\"ORDER BY username ASC \\\";\\n\\t$stmt = $dbh->prepare($query);\\n\\t//binding params\\n\\t$stmt->bindValue('username', $username);\\n\\t$stmt->execute();\\n\\t$result = $stmt->fetchAll(PDO::FETCH_OBJ);\\n\\t$howmany = count($result);\\n\\t//return 0 if no match found\\n\\tif ($howmany < 1) {\\n\\t\\t$result = 0;\\n\\t}\\n }\\n catch (PDOException $e) {\\n die('PDO error getting recent posts: ' . $e->getMessage());\\n }\\n return $result;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a87c7ef2d1a429c3fea8e0fc21581bf5\",\n \"score\": \"0.51356876\",\n \"text\": \"function sql_find_like()\\n\\t{\\n\\t\\treturn \\\"SHOW tables LIKE '\\\".ee()->db->escape_like_str($this->userdata['db_prefix']).\\\"%'\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69d5353ccca9cecf23240f00e96cf355\",\n \"score\": \"0.513257\",\n \"text\": \"function findByFirstName($n){\\n $db = new ConnectDB();\\n \\n $connection = $db->getConnection();\\n \\n $stmt = $connection->prepare(\\\"SELECT ID, FirstName, LastName, username, password, Role, email FROM users WHERE FirstName LIKE ?\\\");\\n $like_n = \\\"%\\\" . $n . \\\"%\\\";\\n $stmt->bind_param(\\\"s\\\", $like_n);\\n $stmt->execute();\\n \\n $result = $stmt->get_result();\\n\\n if(!$result){\\n echo \\\"assume the SQL statement has an error
\\\";\\n return null;\\n exit;\\n }\\n \\n if($result->num_rows == 0){\\n return null;\\n }\\n else {\\n echo \\\"I found \\\" . $result->num_rows . \\\" results!\\\" . \\\"
\\\";\\n }\\n \\n $index = 0;\\n $users = array();\\n \\n while($row = $result->fetch_assoc())\\n {\\n $users[$index] = array($row[\\\"ID\\\"], $row[\\\"FirstName\\\"], $row[\\\"LastName\\\"], \\n $row[\\\"username\\\"], $row[\\\"password\\\"], $row[\\\"Role\\\"], $row[\\\"email\\\"]);\\n\\n ++$index;\\n \\n }\\n return $users;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ba55aa1c84c5df4f08dd0e00c35ca19\",\n \"score\": \"0.5131118\",\n \"text\": \"function search($field,$find){\\r\\n $con = connectToDB();\\r\\n $query = \\\"\\\";\\r\\n $result = NULL;\\r\\n if($con!=NULL){ \\r\\n\\t\\t\\r\\n $query =\\\"SELECT A.ID, B.Fname, B.Lname, B.Email, A.Title, A.Authors, A.Article, A.Journal, A.PubDate, A.Description, A.Picture, A.Video FROM video A, user B WHERE A.UserID = B.UID AND UPPER($field) like '%{$find}%'\\\" ;\\r\\n if(!($result = mysqli_query($con,$query))){\\r\\n mysqli_close($con);\\r\\n\\r\\n return NULL;\\r\\n }\\r\\n else{\\r\\n\\t\\t\\t\\t\\t\\t$rows = array();\\r\\n\\t\\t\\t\\t\\twhile($row = mysqli_fetch_row($result)){\\r\\n\\t\\t\\t\\t\\t\\t $rows[] = $row;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tmysqli_free_result($result);\\r\\n\\t\\t\\t\\t\\t\\tmysqli_close($con);\\r\\n\\t\\t\\t\\t\\t\\treturn $rows;\\r\\n \\t }\\r\\n }\\r\\n else{\\r\\n return NULL;\\r\\n }\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5a06eebbcf47bab5d547f373d7f8ecc\",\n \"score\": \"0.5129445\",\n \"text\": \"public function findPersonByName($name) {\\n $sql = \\\"SELECT id, name, surname, email, comment \\n FROM person \\n WHERE name like :name\\\";\\n\\n // Valmistellaan lause\\n if (! $stmt = $this->connection->prepare ( $sql ))\\n throw new Exception ( $virhelista [8], 8 );\\n\\n // Laita parametrit\\n $nm = \\\"%\\\" . utf8_decode ( $name ) . \\\"%\\\";\\n $stmt->bindValue ( \\\":name\\\", $nm );\\n\\n // Aja lauseke\\n if (! $stmt->execute ())\\n throw new Exception ( $virhelista [8], 8 );\\n\\n // Käsittele hakulausekkeen tulos\\n $result = array ();\\n while ( $row = $stmt->fetchObject () ) {\\n $person = new Person ();\\n\\n $person->setId($row->id);\\n $person->setName(utf8_encode($row->name));\\n $person->setSurname(utf8_encode($row->surname));\\n $person->setEmail(utf8_encode($row->email));\\n $person->setComment(utf8_encode($row->comment));\\n\\n\\n // Laitetaan olio tulos taulukkoon (olio-taulukkoon)\\n $result [] = $person;\\n }\\n\\n $this->count = $stmt->rowCount ();\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3312f5d0f751defd16f1030b1c87603f\",\n \"score\": \"0.5120818\",\n \"text\": \"function findByFirstName($name)\\n {\\n $db = new Database();\\n \\n // Query\\n $sql_query = \\\"SELECT * FROM USERS WHERE FIRST_NAME LIKE '%$name%'\\\";\\n \\n // Connection to db\\n $connection = $db->getConnection();\\n \\n // Result from db query\\n $result = $connection->query($sql_query);\\n \\n // This checks to make sure SQL statement is correct\\n if(!$result)\\n {\\n echo \\\"Something might be wrong with SQL statement\\\";\\n return null;\\n exit;\\n }\\n \\n // This looks for results and returns data\\n if ($result->num_rows == 0)\\n {\\n // echo \\\"No rows found
\\\";\\n return null;\\n }\\n else\\n {\\n $userArray = array();\\n \\n // Loop through results and print data\\n while ($user = $result->fetch_assoc())\\n {\\n // Adds results to an array for use elsewhere\\n array_push($userArray, $user);\\n }\\n return $userArray;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2353ab34ef5e18cb733589d70553b660\",\n \"score\": \"0.5115216\",\n \"text\": \"public function matchUser($queryString)\\n {\\n $query =\\\"SELECT username FROM user WHERE username LIKE '{$queryString}%'\\\";\\n $stmt = $this->connection->prepare($query);\\n $stmt->execute();\\n return $stmt;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52da2c7e555d8b5f01fbac34700459d0\",\n \"score\": \"0.5107274\",\n \"text\": \"public function searchByName()\\n\\t{\\t\\n\\t\\t$name = $this->f3->get('PARAMS.name');\\n\\t\\t$this->setData($this->User->searchByName($name));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4796c8206e684534394f0877de036eb1\",\n \"score\": \"0.5101251\",\n \"text\": \"static function showAllSearchUser($start , $limit, $searchUserName)\\n {\\n try\\n {\\n // $pieces = explode(' ', $searchUserName);\\n // $firstName = @$pieces[0];\\n // $lastName = @$pieces[1];\\n $db = DB::getConnect();\\n // $db->setAttribute(PDO::ATTR_EMULATE_PREPARES,true); \\n $reg = 'SELECT personne_Id as u_id, personne_Nom as u_firstname, personne_Prenom as u_lastname,u.utilisateur_Bloque as u_banned, u.utilisateur_EMail as u_email , u.utilisateur_Password as password, u.utilisateur_DateCreation as u_date_registered , l.level_Nom as u_rank , l.level_Id as u_rank_id FROM personne p INNER JOIN utilisateur u ON u.utilisateur_Id = p.personne_Id INNER JOIN `level` l ON l.level_Id = u.level_Id WHERE :searchName LIKE Concat(Concat(\\\\'%\\\\',personne_Nom),\\\\'%\\\\') OR :searchName LIKE Concat(Concat(\\\\'%\\\\',personne_Prenom),\\\\'%\\\\') LIMIT :start, :limit';\\n $st = $db->prepare($reg);\\n $st->bindValue(':start', $start, PDO::PARAM_INT);\\n $st->bindValue(':limit', $limit, PDO::PARAM_INT);\\n $st->bindValue(':searchName', $searchUserName, PDO::PARAM_STR);\\n // $st->bindValue(':searchLastName', '%'.$lastName.'%', PDO::PARAM_STR);\\n $st->execute();\\n $result = $st->fetchAll(PDO::FETCH_CLASS, 'User');\\n return $result;\\n }\\n catch (PDOException $e) \\n {\\n $e->getMessage(); \\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f26b81294a838817c31c6de49fb82fa\",\n \"score\": \"0.50924814\",\n \"text\": \"public function member()\\n\\t{\\n\\t\\t// Escape the search string\\n\\t\\t$this->_search = strtr($this->_search, array('%' => '\\\\%', '_' => '\\\\_', '*' => '%', '?' => '_', '&' => '&'));\\n\\n\\t\\trequire_once(SUBSDIR . '/Members.subs.php');\\n\\n\\t\\t// Find the member.\\n\\t\\treturn getMember($this->_search, !empty($this->_params['buddies']) ? User::$info->buddies : array());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"229c2ec17aebbf7dd65273465c62ef83\",\n \"score\": \"0.5089021\",\n \"text\": \"function get_restaurant_details_from_pattern($pattern) {\\r\\n return get_array(\\\"SELECT * \\r\\n FROM Restaurants\\r\\n WHERE restaurantName LIKE '%$pattern%'\\\");\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d122ff101c1c23dd5b808f895dcb027e\",\n \"score\": \"0.5083844\",\n \"text\": \"public function getList($name = null, $limit = 10)\\n {\\n $result = $this->createQueryBuilder('m')\\n ->where('m.name LIKE :name')\\n ->setParameter('name', '%' . $name . '%')\\n ->setMaxResults($limit)\\n ->getQuery()->execute();\\n \\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db3bb559a3575eb5cbbc73c03a6ccf8c\",\n \"score\": \"0.5077002\",\n \"text\": \"function phorum_db_search_users($search)\\n{\\n $PHORUM = $GLOBALS[\\\"PHORUM\\\"];\\n\\n $conn = phorum_db_mysql_connect();\\n\\n $users = array();\\n\\n $search = trim($search);\\n\\n $sql = \\\"select user_id, username, email from {$PHORUM['user_table']} where username like '%$search%' or email like '%$search%'order by username\\\";\\n\\n $res = mysql_query($sql, $conn);\\n if ($err = mysql_error()) phorum_db_mysql_error(\\\"$err: $sql\\\");\\n\\n if (mysql_num_rows($res)){\\n while ($user = mysql_fetch_assoc($res)){\\n $users[$user[\\\"user_id\\\"]] = $user;\\n }\\n }\\n\\n return $users;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33e7571d519470f5eaffa7d39330ca27\",\n \"score\": \"0.507421\",\n \"text\": \"function getByWildcard($search) {\\n $prep_search = '%' . $search . '%'; //prepare the text $search so it will be a wildcard param\\n if (is_numeric($search)) { //if $search is numeric also search the id field\\n $sql = \\\"SELECT distinct(u.id), u.* FROM users u WHERE f_name LIKE ? OR l_name LIKE ? OR nick LIKE ? OR email LIKE ? OR id = ? ORDER BY id DESC LIMIT 20\\\";\\n $query = $this->db->query($sql, array($prep_search, $prep_search, $prep_search, $prep_search, $search));\\n } else {\\n $sql = \\\"SELECT distinct(u.id), u.* FROM users u WHERE f_name LIKE ? OR l_name LIKE ? OR nick LIKE ? OR email LIKE ? ORDER BY id DESC LIMIT 20\\\";\\n $query = $this->db->query($sql, array($prep_search, $prep_search, $prep_search, $prep_search));\\n }\\n //echo $this->db->last_query();\\n if ($query->num_rows() > 0) {\\n foreach ($query->result() as $row) {\\n $data[] = $row;\\n }\\n return $data;\\n } else {\\n return -1;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a752a4964035330fcff630783df1d512\",\n \"score\": \"0.5074176\",\n \"text\": \"function displayResults($input)\\r\\n {\\r\\n //1. Define the query\\r\\n $sql = \\\"SELECT * FROM student WHERE first_name LIKE '%$input%' OR last_name LIKE '%$input%' ORDER BY first_name ASC\\\";\\r\\n\\r\\n //2. Prepare the statement\\r\\n $statement = $this->_dbh->prepare($sql);\\r\\n\\r\\n //3. Bind the parameters - SKIP\\r\\n\\r\\n //4. Execute the statement\\r\\n $statement->execute();\\r\\n\\r\\n //5. Process the results\\r\\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\\r\\n return $result;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcb4d35efae05e30dfda0974edf9d3a2\",\n \"score\": \"0.50668037\",\n \"text\": \"public function searchByName($name, $languageId);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65a850db6f5d5a28ada0ca085b2563b8\",\n \"score\": \"0.5065772\",\n \"text\": \"protected function search() {\\n\\t\\t$this->matches = array();\\n\\t\\t$sql = \\\"SELECT\\t\\tuser.userID\\n\\t\\t\\tFROM\\t\\twcf\\\".WCF_N.\\\"_user user\\n\\t\\t\\tLEFT JOIN\\twcf\\\".WCF_N.\\\"_user_option_value option_value \\n\\t\\t\\tON\\t\\t(option_value.userID = user.userID)\\\";\\n\\t\\t\\n\\t\\t// build search condition\\n\\t\\t$this->conditions = new ConditionBuilder(); \\n\\t\\t\\n\\t\\t// static fields\\n\\t\\t$this->buildStaticConditions();\\n\\t\\t\\n\\t\\t// dynamic fields\\n\\t\\t$this->buildDynamicConditions();\\n\\t\\t\\n\\t\\t// call buildConditions event\\n\\t\\tEventHandler::fireAction($this, 'buildConditions');\\n\\n\\t\\t// do search\\n\\t\\t$result = WCF::getDB()->sendQuery($sql.$this->conditions->get(), $this->maxResults);\\n\\t\\twhile ($row = WCF::getDB()->fetchArray($result)) {\\n\\t\\t\\t$this->matches[] = $row['userID'];\\t\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62bb4ed24e3a7ff4c328c9d6fed7d220\",\n \"score\": \"0.50594723\",\n \"text\": \"public function findByName($name);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62bb4ed24e3a7ff4c328c9d6fed7d220\",\n \"score\": \"0.50594723\",\n \"text\": \"public function findByName($name);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62bb4ed24e3a7ff4c328c9d6fed7d220\",\n \"score\": \"0.50594723\",\n \"text\": \"public function findByName($name);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62bb4ed24e3a7ff4c328c9d6fed7d220\",\n \"score\": \"0.50594723\",\n \"text\": \"public function findByName($name);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec5177ee587863ac5d360cdbdcbaa34b\",\n \"score\": \"0.5059028\",\n \"text\": \"function paging_member_where($where,$idpaket,$carimember){\\n\\t\\t$this->db->where($where);\\n\\t\\tif (!empty($idpaket)) {\\n\\t\\t\\t$this->db->where('paket', $idpaket);\\n\\t\\t}\\n\\t\\tif (!empty($carimember)) {\\n\\t\\t\\t$this->db->like('nama', $carimember);\\n\\t\\t}\\n\\t\\treturn $this->db->get('user');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1fa52d604ca985c93ae67f5c2e726504\",\n \"score\": \"0.5056917\",\n \"text\": \"function searchUsers($text=false){\\n\\t\\t$filter=false;\\n\\t\\tif($text!=false){\\n\\t\\t\\t$filter=\\\" FirstName like '$text' or LastName like '$text' \\\";\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $this->getUsers($filter);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0b88ebb0afa015c7b0b019c20c02f03\",\n \"score\": \"0.505056\",\n \"text\": \"function search($keywords){\\r\\n\\t\\t$query = \\\"SELECT c.customerID, c.firstName, c.lastName, c.username, \\r\\n c.country, c.region, c.city, c.address FROM \\\" . $this->table_name . \\\" c WHERE \\r\\n\\t\\tc.customerID LIKE ? OR c.firstName LIKE ? OR c.lastName LIKE ? OR c.username LIKE ? \\r\\n\\t\\tOR c.country LIKE ? OR c.region LIKE ? OR c.city LIKE ? OR c.address LIKE ?\\\";\\r\\n\\t\\t//Preparar Statement\\r\\n\\t\\t$stmt = $this->conn->prepare($query);\\r\\n\\t\\t// Saneamos\\r\\n\\t\\t$keywords=htmlspecialchars(strip_tags($keywords));\\r\\n \\t\\t$keywords = \\\"%{$keywords}%\\\";\\r\\n\\t\\t// Bind los parametors\\r\\n\\t\\t$stmt->bindParam(1, $keywords);\\r\\n \\t\\t$stmt->bindParam(2, $keywords);\\r\\n \\t\\t$stmt->bindParam(3, $keywords);\\r\\n\\t\\t$stmt->bindParam(4, $keywords);\\r\\n \\t\\t$stmt->bindParam(5, $keywords);\\r\\n \\t\\t$stmt->bindParam(6, $keywords);\\r\\n\\t\\t$stmt->bindParam(7, $keywords);\\r\\n \\t\\t$stmt->bindParam(8, $keywords);\\r\\n \\t\\t// execute query\\r\\n \\t\\t$stmt->execute();\\r\\n\\t\\treturn $stmt;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79363bf681497d8a02540b125cc3340e\",\n \"score\": \"0.5033661\",\n \"text\": \"function search($text){\\n\\t\\n\\t// connection to the Ddatabase\\n\\t$db = new PDO(\\\"mysql:host=localhost;dbname=english\\\", 'root', '');\\n\\t// let's filter the data that comes in\\n\\t$text = htmlspecialchars($text);\\n\\t// prepare the mysql query to select the users \\n\\t$get_word = $db->prepare(\\\"SELECT word FROM words WHERE word LIKE concat('%', :word, '%')\\\");\\n\\t// execute the query\\n\\t$get_word -> execute(array('word' => $text));\\n\\t// show the users on the page\\n\\twhile($words = $get_word->fetch(PDO::FETCH_ASSOC)){\\n\\t\\t// show each user as a link\\n\\t\\techo ''; print_r(compact('data')); exit;\n //$data = DB::table('users')->where('id', '$id'); \n \n //return view('user', ['lessions' => $data]);\n return view('user', compact('data', 'userId'));\n //return view('user')->with('id', $ids)->with('lessions', $lessions);\n }","title":""},{"docid":"c77dd5049bbec2faecbb07009ed130fc","score":"0.6212805","text":"public function show()\n {\n //Authentication granted\n $current_user = Auth::user();\n return view('user.profile-extended')->with('user', $current_user);\n\n }","title":""},{"docid":"dcd26de77ce3f0580a99facc343e0a3f","score":"0.620337","text":"public function view_users()\r\n\t{\r\n\t\t// Display\r\n\t\t// Load template\r\n\t\tTemplate::set('self', $this->_self);\r\n\t\tinclude(BLUPATH_TEMPLATES.'/profile/listing.php');\r\n\t}","title":""},{"docid":"881147ad050992813d37a7730ecf3fab","score":"0.6203004","text":"public function show($id)\n {\n // if (!Gate::allows('users_manage')) {\n // return abort(401);\n // }\n $roles = Role::get();\n\n $user = User::findOrFail($id);\n //$login = UserLogin::where('user_id',$id)->first();\n $login = UserLogin::where('user_id',$user->id)->first();\n $user_cards = null;\n $user_addresses = UserAddress::where('user_id',$id)->get();\n \n\n return view('admin.users.show', compact('user', 'roles' , 'login','user_cards','user_addresses'));\n }","title":""},{"docid":"2bdf9fa18469ffa1b492e86ca8473e59","score":"0.6202039","text":"public function showbyuser()\n {\n //\n if (Auth::user())\n { \n $userid=Auth::user()->id;\n $items= ArticleModel::Where(\"user_id\",$userid)->get();\n\n\n return view(\"articles/showbyuser\",[\"items\"=>$items]);\n }\n else return view('auth.login');\n\n \n }","title":""},{"docid":"8e9adb360666815a15ca875817057848","score":"0.62018526","text":"public function index()\n {\n $relations = auth()->user()->relations;\n\n return view('relation.index', compact('relations'));\n }","title":""},{"docid":"4a0e797741193302cc03e973a1155163","score":"0.61963505","text":"public function index()\n {\n $user = User::where('id', Auth::user()->id)->with(['role', 'institute'])->first();\n return view('author.profile.index', compact('user'));\n }","title":""},{"docid":"5bbbfe4f0bf09a94f7fdd67ebe31275c","score":"0.6196305","text":"public function show($id)\n {\n // --auth--\n if (Auth::user()->role == \"owner\" || Auth::user()->role == \"manager\") {\n $user = User::find($id);\n } else {\n return redirect('/')->with('error','Unauthorized Page');\n }\n\n if ($user->role == \"owner\" && Auth::user()->role == \"owner\") {\n return view('pages.users.userprofile') ->with('user',$user);\n } else if ($user->role != \"owner\") {\n return view('pages.users.userprofile') ->with('user',$user);\n } else {\n return redirect('/admin')->with('error','Unauthorized Page');\n }\n \n }","title":""},{"docid":"a2df05187ce97aa28e08f034fbf4ec32","score":"0.6193886","text":"public function index()\n {\n\n $userId = Auth::id();\n\n $userAuth = User::find($userId);\n\n $meetings = Meeting::orderBy('sensibility', 'desc')->paginate(10);\n\n $meetingsStaff = Meeting::orderBy('sensibility', 'desc')->where('meetIdHost', '=', Auth::user()->idUser)->paginate(10);\n\n $user= User::all()->load('meetingHost');\n\n \n \n \n\n \n\n if (Auth::user()->role()==true) {\n return view('meetingsSecurityView.index', compact('meetings', 'user', 'visitor'));\n }\n else\n return view('meetings.index', compact('meetingsStaff', 'user', 'visitor', 'userAuth'));\n }","title":""},{"docid":"4a766608d3f149e3eeb0dd460d629882","score":"0.61877286","text":"public function index()\n {\n $dataUser = User::all();\n return view('owner.akun', compact('dataUser'));\n }","title":""},{"docid":"d533d568eaaf25eb65bd26555ae3f840","score":"0.6174966","text":"public function userListings()\n {\n $listings = Listing::where('userID', Auth::user()->userID)\n ->with(['listingPhotos'])\n ->orderBy('make')\n ->get();\n return view('pages.user-listings',['listings' => $listings]);\n }","title":""},{"docid":"8a9b3c5cd2af2444bf84ba94995bed12","score":"0.6172171","text":"public function showProfile()\n\t{\n\t\t$u = Auth::user();\n\t\t$dogs = $u->getMyDogs();\n\t\treturn view('userProfile', ['user'=>$u,'dogs'=>$dogs]);\n\t}","title":""},{"docid":"75572cb6db6634cec4527e1c4a40ed20","score":"0.6170099","text":"public function index()\n {\n $currentuser = User::where('rut', Auth::user()->rut)->first();\n$user = User::all();\n //return $user = DB::collection('users')->where('rut',Auth::user()->rut)->first()->get();\n // && $users->givePermissionTo('show users');\n\n // return $userInfo = Auth::user()->id;\n\n // return $user->hasPermissionTo('edit articles');\n //return $role = Role::findByName('Visualizador');\n\n return view('home')->with('user', $user);\n }","title":""},{"docid":"e4d7181de842ed142020846960d5e801","score":"0.61681885","text":"public function index()\n {\n // return User::all();\n Gate::authorize('view', 'users');\n $lstUsr = User::with('role')->paginate();\n return UserResource::collection($lstUsr);\n }","title":""},{"docid":"49839c9bffc6584144ed7938db3ce11e","score":"0.616539","text":"public function showMe()\n {\n return new AuthorResource(Auth::user());\n }","title":""},{"docid":"841fa75111cca382957f5e33daced6c5","score":"0.61639345","text":"public function show($id)\n {\n //View a usergroup -- superadmin only\n }","title":""},{"docid":"b8caabb295863bd7a92733200486ec09","score":"0.6162807","text":"public function show()\n {\n \n return view('admin.users.my-profile');\n \n }","title":""},{"docid":"efdd47c429dcb45f5b388eed5dd9132e","score":"0.61583215","text":"public function show(Request $request)\n {\n $id_user = Auth::id();\n $user = DB::table('users')\n ->where('id', $id_user)\n ->first();\n\n $people = DB::table('people')\n ->join('users', 'users.people_id', '=', 'people.id')\n ->where('people.id', '=', $user->people_id)\n ->first();\n\n return view('user.viewprofile', compact(['user','people']));\n }","title":""},{"docid":"06f42f3be5105a43e8871fe4d80e93bf","score":"0.61455","text":"public function show($id) {\n $current_user_object = JWTAuth::parseToken()->authenticate();\n if ( !($current_user_object->isActiveUser() && ($id==$current_user_object->id)) && !($current_user_object->hasRule('user_show')) ) {\n return $this->setStatusCode(403)->respondWithError('Forbidden');\n }//if ( !($current_user_object->isActiveUser() && ($id==$current_user_object->id)) && !($current_user_object->hasRule('user_show')) )\n return $this->UserModel->findOrFail($id)->getStandardJsonFormat();\n }","title":""},{"docid":"421e16cb35b310fe898f1b88aa5362d2","score":"0.61447597","text":"public function show()\n {\n return $this->response->item(\n auth()->user(),\n new UserTransformer()\n );\n }","title":""},{"docid":"9ebb8a65dbf6bba9fca529ec67dbc820","score":"0.61297464","text":"public function show(User $user){\n //\n }","title":""},{"docid":"36b7f2ac8a57e6ffc1cce35f6ad404f7","score":"0.61272115","text":"public function show()\n {\n return $this->response(\n $this->transform->item(Auth::guard('api')->user(), new UserTransformer)\n );\n }","title":""},{"docid":"d465be294d88c29aa696886742e082b0","score":"0.6120978","text":"public function show($id)\n {\n if (!Sentry::check()) {\n return Redirect::to('/')->withErrors('Please log in the website to continue');\n }\n if ($id == 'me') {\n $my_votes = UserVote::where('user_id', '=', Sentry::getUser()->id)\n ->orderBy('created_at', 'DESC')\n ->get();\n\n $user = User::where('users.id', '=', Sentry::getUser()->id)\n ->join('profiles', 'users.id', '=', 'profiles.user_id')\n ->first();\n\n if (Request::ajax()) {\n // If the request is AJAX, return only the list of parties without other html\n return View::make('site._partials.user-dashboard')\n ->with('title', 'User Dashboard')\n ->with('user', $user)\n ->with('votes', $my_votes);\n\n } else {\n return View::make('site.users.dashboard')\n ->with('title', 'User Dashboard')\n ->with('user', $user)\n ->with('votes', $my_votes);\n }\n }\n }","title":""},{"docid":"0a2370943d3e74ecf1c10262e859db7f","score":"0.6120262","text":"public function show($id) {\n //$user = User::find($id);\n }","title":""},{"docid":"a93a15699316fa0332255c04f8eff9d8","score":"0.61164105","text":"public function show(Request $request)\n {\n return response()->json($request->user());\n }","title":""},{"docid":"469b7d04b2679996b5eec8ec833c190e","score":"0.6115875","text":"public function profileshow()\n {\n return auth('api')->user()->profile;\n }","title":""},{"docid":"7a7168dbffdb6bdce1b72ef6d91e3e52","score":"0.61098576","text":"public function showUsers(Request $request){\n $this ->authorize('admin', $request->user());\n\n //get the users and pass it down to the view\n $users = User::paginate(6);\n return view(\"adminViews.userViews.manageUsers\",\n ['users' => $users]);\n }","title":""},{"docid":"02d6556d4152ad38172cdaf2d887d4ab","score":"0.61069715","text":"public function show()\n {\n $users=User::all();\n return view('backend.supervisor.viewmember',compact('users'));\n }","title":""},{"docid":"f64624e315021881b35cb104947cb66d","score":"0.6104561","text":"public function show($id)\n {\n if(auth()->user()->role->name == 'Admin'){\n $request = URequest::findOrFail($id);\n return view('user.show', compact('request'));\n } elseif(auth()->user()->role->name == 'Employee'){\n $request = auth()->user()->requests()->findOrFail($id);\n return view('user.show', compact('request'));\n }\n }","title":""},{"docid":"12e8982226d458eabe9bfd095ccfe663","score":"0.6099354","text":"public function index()\n {\n return Auth::user()->entries;\n }","title":""},{"docid":"6c76b851b8e91827913f3293b95188d5","score":"0.60975474","text":"public function indexAction()\r\n {\r\n $division = $this->get('security.context')->getToken()->getUser();\r\n return array('user' => $division);\r\n }","title":""},{"docid":"32060ec1e60835513d0c1e1a624b2dd1","score":"0.60911196","text":"public function show()\n {\n if (Auth::check()) {\n return view('myAccount/myAccount');\n\n } else {\n\n return redirect()->route('login'); //users that arent logged in should login first\n\n }\n\n }","title":""},{"docid":"e84d7631dbbe183aeaa158d30890bef5","score":"0.6087426","text":"public function index()\n {\n //$this->authorize('user.read');\n if( Gate::denies('user.read') ){\n return view(config('app.template').'.error.403');\n }\n\n $users = User::join('karyawans', 'users.id', '=', 'karyawans.user_id')\n ->with(['roles'])\n ->where('users.active', 1)\n ->select(['users.*', 'karyawans.nama'])->get();\n $data = ['users' => $users];\n return view(config('app.template').'.user.table', $data);\n }","title":""},{"docid":"2e97c70028aeda164c083050cd1036d6","score":"0.60864973","text":"public function index()\n {\n return $this->repository->with(['owner', 'client'])->findWhere(['owner_id'=>Authorizer::getResourceOwnerId()]);\n }","title":""},{"docid":"fa76f387a19fee42feba47e97e33db7a","score":"0.60853964","text":"public function index()\n {\n $user = User::with('kelas','level')->get();\n return view('admin.user.index',compact('user'));\n }","title":""},{"docid":"4296542dc1151ccd3ab6623b121d2651","score":"0.6081445","text":"public function showUsers()\n {\n $userListing = $this->user->fetchUsersAndRelatedData();\n $allRoles = $this->role->fetchRoles(['id', 'name']);\n $allCompanies = $this->company->fetchCompanies(['id', 'name']);\n $allStates = $this->states->getStates();\n return view('users/users', ['companies' => $allCompanies, 'roles' => $allRoles, 'states' => $allStates, 'userListing' => $userListing]);\n }","title":""},{"docid":"90fa69f16a1e33eac1bab0f3a6d77d06","score":"0.60781276","text":"public function getShow()\n {\n $entities = Entity::forAuthUser()->orderBy('name')->paginate(20);\n\n return view('admin.entities.index')\n ->with('entities', $entities);\n }","title":""},{"docid":"e0cae7f80b8e0b297114d8130978f79e","score":"0.60732406","text":"public function useraccess(){\n return $this->belongsTo('App\\Models\\User','approved_by')->where('company_id_fk',Sentinel::getUser()->id);\n }","title":""},{"docid":"5cccaad3bbc5a42547a6b99bbbbe75fe","score":"0.6065127","text":"public function show()\n {\n $id = Auth()->id();\n $user = User::find($id);\n return view('admin.profiles.index', compact('user'));\n }","title":""},{"docid":"43ad7189df3666c2a688a00435e99d5d","score":"0.60576993","text":"public function user_view()\n {\n $data['client_list'] = $this->MainModel->selectAll('client_details', 'client_name');\n $data['country'] = $this->MainModel->selectAll('countries', 'name');\n $data['role'] = $this->MainModel->selectAll('roles', 'role');\n $this->load->view('layout/header');\n $this->load->view('layout/sidenav');\n $this->load->view('template/users', $data);\n $this->load->view('layout/footer');\n }","title":""},{"docid":"05faee85dc536e27cda6c13bd0ba7497","score":"0.60573494","text":"public function show($id)\n { \n $user = User::find($id);\n $rol_user = $user->rol_id;\n\n if($rol_user == 1){\n $centro = Centro::DirectorCentro($user->id);\n $aulas = Centro::AulasCentro($centro->id);\n return view ('usuarios.show')->with('user',$user)->with('centro',$centro)->with('aulas',$aulas);\n }\n\n if($rol_user == 2){\n $centros = Aula::agrupar_centros_aulas_por_profesor($id);\n return view ('usuarios.show')->with('user',$user)->with('centros',$centros);\n }\n\n if($rol_user == 3){\n $centros = Nino::agrupar_ninos_tutores_por_centro($id);\n return view ('usuarios.show')->with('user',$user)->with('centros',$centros);\n }\n\n }","title":""},{"docid":"c10f8875ff7776060844f69cf91d11dc","score":"0.6057008","text":"public function logged_user()\n {\n return $this->belongsTo(User::class, 'user_id', 'id');\n }","title":""},{"docid":"b523156d255978fd750f28377740738f","score":"0.6055357","text":"public function user() {\n \n // Verify if the app is enabled\n if ( !get_option('app_posts_enable') || !plan_feature('app_posts') ) {\n show_404();\n }\n \n // Instantiate the class\n (new MidrubAppsCollectionPostsControllers\\User)->view();\n \n }","title":""},{"docid":"70b46c45d7c0c3a3038d303f80787d91","score":"0.60524976","text":"public function index()\n {\n return auth()->user();\n }","title":""},{"docid":"da95cf185ef86ec2088c12769a1e9322","score":"0.60515213","text":"public function show()\n {\n if(Auth::user()->department == \"Technical Team\")\n {\n $users = DB::table('users')->where('position', '!=', 'Super Admin')->where('department', 'Technical Team')->get(); \n }\n elseif(Auth::user()->department == \"Lesson Support\")\n {\n $users = DB::table('users')->where('position', '!=', 'Super Admin')->where('department', 'Lesson Support')->get();\n }\n else\n {\n $users = DB::table('users')->where('position', '!=', 'Super Admin')->get(); \n }\n\n\n return view('/admin/userlist', ['users' => $users]);\n }","title":""},{"docid":"4ba5f49e706a6fcb383bb34adc0eb816","score":"0.60509956","text":"public function index()\n {\n if (Auth::check()) {\n $user = Auth::user();\n $parkings = Parking::all();\n return view('parkings.index', compact('user','parkings'));\n\n /*if(Auth::user()->typeOf == 'webadmin'){\n //echo \"si\";\n //$users = $this->list();\n return view('parkings', compact('users'));\n }else{\n return view('parkings.index', compact('user'));\n } */\n }else {\n return view('/home');\n }\n }","title":""},{"docid":"99fb295f3f0da5f85a50aab7ddb7eeff","score":"0.60477173","text":"public function index()\n {\n if (\\Gate::allows('isAdmin')) {\n return User::latest()->paginate(15);\n }\n }","title":""},{"docid":"581bd9f2bb7af110121ed61853bad27f","score":"0.60451066","text":"public function index(Request $request)\n {\n $id = Auth::guard('searcher')->user()->id;\n\n // getting data of searcher which is currently logged in\n $searchers = Searcher::where('id',$id)->get();\n\n return view('searcherProfileView',compact('searchers'));\n\n }","title":""},{"docid":"a1e53da571431a93605179466767860f","score":"0.60449886","text":"public function index()\n {\n\n $users = User::with('user_departs','hands')->latest()->paginate(15);\n $users->load('user_departs','hands');\n\n// $users = User::latest()->paginate(15);\n\n return view('admin.user.index', compact('users'));\n }","title":""},{"docid":"1a603ec0bb26108cd8231c5712fe87cc","score":"0.60448515","text":"function showUsers() {\n $users = $this->model->getAll();\n $cantidad = count($users);\n $this->view->printUsers($users, $cantidad);\n }","title":""},{"docid":"49bc16c4308763ec42fbf37debae98f1","score":"0.604136","text":"public function show(User $user)\r\n {\r\n //\r\n }","title":""},{"docid":"49bc16c4308763ec42fbf37debae98f1","score":"0.604136","text":"public function show(User $user)\r\n {\r\n //\r\n }","title":""},{"docid":"4f85399e9fdff7b46a11c25caf21164e","score":"0.60399693","text":"public function show($id)\n {\n $user = $this->user->find($id);\n $permission = Permission::orderBy('group','desc')->get();\n return view('admin.user.show',compact('user','permission'));\n }","title":""},{"docid":"231f2fd9f804228d7f565a695bf4e505","score":"0.6038127","text":"public function showUserAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n return $this->render('AwaStoreBundle:Store:showUser.html.twig',array('user'=>$user));\n }","title":""},{"docid":"2d05681fb0003482a4d2a87d80288532","score":"0.6034926","text":"public function index()\n {\n\n $medecins = medecin::latest()->paginate(5);\n return view('medecin.auth.show', compact('agences', 'medecins'));\n }","title":""},{"docid":"6de93ed364e0cf783b62069b17d3e90e","score":"0.603424","text":"public function show()\n {\n $user = DB::table('signs')\n ->orderBy('id', 'DESC')\n ->paginate(1);\n\n \n \n \n\n return view('show', compact('user'));\n }","title":""},{"docid":"f99499d0d0b4342d92bd31f16ac7a98f","score":"0.6032756","text":"public function show(User $user)\n {\n \n }","title":""},{"docid":"f99499d0d0b4342d92bd31f16ac7a98f","score":"0.6032756","text":"public function show(User $user)\n {\n \n }","title":""},{"docid":"b57d353e348d3a18480b811578cc3826","score":"0.6029842","text":"public function index()\n {\n //\n $id = auth()->user()->id;\n $professor = \\App\\Professor::find($id);\n\n return view('auth.profile',compact('professor') );\n \n }","title":""},{"docid":"d8fd2bdaaf93f755a59ba3a4ac20640e","score":"0.6029698","text":"public function show(Request $request)\n {\n $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');\n $em = $this->getDoctrine()->getManager()->getRepository(User::class);\n $users = $em->findAll();\n\n return $this->render('security/usersList.html.twig', array(\n 'users' => $users,\n ));\n }","title":""},{"docid":"6e01728c18d138b8534a362b5cd61f8d","score":"0.6029159","text":"public function show($id)\n {\n $user = $this->user->find($id);\n $user_role = $user->roles->first()->name;\n $imgDest = env('PATH_PROF_THUMB_IMG');\n\n return view('protected.admin.show_user')->withUser($user)->withUserRole($user_role)->with('imgDest',$imgDest);\n // $user = $this->user->find($id);\n // $this->roles = Sentinel::getRoleRepository()->createModel();\n // $user_role = $user->roles->first()->name;\n // $roles = $this->roles->paginate();\n // $destinationPath = '/assets/img/avatars/thumbnails/';\n // return view('protected.admin.show_user')->withUser($user)->withUserRole($user_role)->withRoles($roles)->with('destinationPath',$destinationPath);\n }","title":""},{"docid":"892d74ca1d4fe381669bc27bb6c63361","score":"0.60282713","text":"public function index()\n {\n \n $user_id = auth()->user()->id; // Get the user_id using the auth() method\n $user = User::find($user_id); // Get the user by looking into de User model using the user_id\n\n $data = array(\n 'posts' => $user->posts,\n 'name' => $user->name\n ); \n\n return view('home')->with($data); //Since we already have defined the relationship\n }","title":""},{"docid":"8f567b18641506ea69d2b0dbf64e12a3","score":"0.60258996","text":"public function getShow($id)\n {\n $group = DB::table('groups')\n ->join('users', 'groups.user_id', '=', 'users.id')\n ->where('groups.id', $id)\n ->select(\n 'groups.*',\n 'users.name as creator'\n )\n ->get();\n\n $members = DB::table('users as U')\n ->join('users_groups as UG', 'U.id', '=', 'UG.user_id')\n ->where('UG.group_id', $id)\n ->select(\n 'U.name as name'\n )\n ->get();\n return view('groups.profile')->with(['group'=>$group, 'members'=>$members]);\n }","title":""},{"docid":"1ea039a2c1ef4901d6e67dff79bc4581","score":"0.6025823","text":"public function user()\n {\n return $this->belongsTo($this->getAuthModelName(), 'user_id');\n }","title":""},{"docid":"4369b54b21c0fb944b1d3d910a2b5032","score":"0.6024616","text":"public function owner($id){\n $owners = \\App\\Models\\Animal::find($id)->myOwner;\n return view('owner.show', ['owners' => $owners]);\n }","title":""},{"docid":"583e43fba9b1ef2e93cd319e23cca519","score":"0.60245866","text":"public function index()\n {\n $owner = DB::table('owner_list')->select('owner_list.*' , 'county_in_us.county_name')\n ->join('county_in_us' , 'owner_list.county_code', '=', 'county_in_us.county_code')\n ->where('user_code' , auth()->user()->id)\n ->get();\n return view('owner')->with('owner',$owner);\n\n //return view('owner');\n }","title":""},{"docid":"8442218273b4e735b5352c0a63028c0c","score":"0.60214245","text":"public function showData(){\n\t\t\t $principalMsg = TeacherMessage::all();\n\n\t\t return view('admin.principal.show', compact('principalMsg'));\n\t\t}","title":""},{"docid":"376cbafd8d20b177537018c0dd2c4008","score":"0.60131264","text":"public function index()\n {\n return UserResource::collection($this->getUserModel()->with('companies:id,name,active')->get());\n }","title":""},{"docid":"3d3d83176550f58ce5e45a0bcf7f71b3","score":"0.6012141","text":"public function show()\n {\n $users = User::orderBy('status', 'desc')->get();\n \n return view('admin.show_users', compact('users'));\n \n }","title":""},{"docid":"9a98ffb7041ee488f05e5f77210299c1","score":"0.6008556","text":"public function index()\n {\n $users = $this->user->getAll();\n $admin = Sentinel::findRoleByName('Admins');\n $destination_prof_img = env('PATH_PROF_THUMB_IMG');\n return view('protected.admin.list_users')->withUsers($users)->withAdmin($admin)->with('destination_prof_img', $destination_prof_img);\n }","title":""}],"string":"[\n {\n \"docid\": \"4c0624e547b83a568baf4e415493c267\",\n \"score\": \"0.6630198\",\n \"text\": \"public function show()\\n\\t{\\n\\t\\treturn $this->respondWithItem(Auth::user(), new UserTransformer);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4306c4057c8a635ab973493ff6c1299d\",\n \"score\": \"0.6608132\",\n \"text\": \"public function showAction()\\n {\\n $user = $this->container->get('security.context')->getToken()->getUser();\\n \\n return array(\\n 'user' => $user,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0170d3784398c6efdbb362a06031a8a1\",\n \"score\": \"0.6605357\",\n \"text\": \"public function show()\\n {\\n return auth('api')->user(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"329de60f2f6b14dce4f6a2b46198f8fe\",\n \"score\": \"0.65306276\",\n \"text\": \"public function show()\\n {\\n return response()->json($this->transformer->transform(Auth::user()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1a3600275a4f4a87102ce752a37a543\",\n \"score\": \"0.65204304\",\n \"text\": \"public function showAction() {\\r\\n NavigationBar::add(\\\"Twoje dane\\\", \\\"profile_show\\\");\\r\\n $em = $this->getDoctrine()->getManager();\\r\\n $user = $this->get('security.context')->getToken()->getUser();\\r\\n $entity = $em->getRepository('KniThomasBundle:User')->find($user->getId());\\r\\n\\r\\n if (!$entity) {\\r\\n throw $this->createNotFoundException('Unable to find User entity.');\\r\\n }\\r\\n\\r\\n\\r\\n return array(\\r\\n 'entity' => $entity\\r\\n );\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df49825a0f99266e98a958a2081ef443\",\n \"score\": \"0.65047216\",\n \"text\": \"public function index()\\n {\\n return $this->show(Auth::user()->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3fcc2e1762ccbe8c1f1d42a3a6c1128\",\n \"score\": \"0.64841926\",\n \"text\": \"public function getUserAccess()\\r\\n {\\r\\n if (Sentry::getUser()->hasAccess('admin')) {\\r\\n\\r\\n $userAccess = \\\"admin\\\";\\r\\n }\\r\\n else {\\r\\n $userAccess = \\\"others\\\";\\r\\n }\\r\\n\\r\\n // Show the page\\r\\n return View('admin/groups/any_user', compact('userAccess'));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c82d3d9264d948915533b9cba12b824\",\n \"score\": \"0.64671355\",\n \"text\": \"public function show()\\n { \\n $users = Auth::user();\\n //dd($users);\\n return view('profile', compact('users')); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0645c7b8258fcf63ebc24b0c37ad420f\",\n \"score\": \"0.6463307\",\n \"text\": \"public function actionShow()\\n\\t{\\n\\t\\t$authManager = $this->getAuthManager();\\n\\t\\t$roles = $authManager->getRoles();\\n\\n\\n\\t\\tif($roles) foreach($roles as $role)\\n\\t\\t{\\n\\t\\t\\tprint $role->name.\\\" (\\\".$role->description.\\\")\\\\n\\\";\\n\\n\\t\\t\\t$roleUsers = $authManager->getUserIdsByRole($role->name);\\n\\n\\t\\t\\tif($roleUsers) foreach($roleUsers as $userId)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$user = $this->findIdentityById($userId);\\n\\n\\t\\t\\t\\tif($user)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tif(method_exists($user, 'toArray'))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$userArr = $user->toArray();\\n\\t\\t\\t\\t\\t\\tprint \\\" - \\\".implode(\\\"\\\\t\\\", $userArr).\\\"\\\\n\\\";\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tprint \\\" - \\\".$user->getId().\\\" (add a method \\\".get_class($user).\\\"::toArray() for more information)\\\\n\\\";\\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\\tprint \\\"...no users\\\\n\\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\tprint \\\"\\\\n\\\";\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\tprint \\\"...roles empty\\\\n\\\";\\n\\t\\t}\\n\\n\\t\\tprint \\\"\\\\n\\\";\\n\\n\\t\\treturn ExitCode::OK;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"372ad696bf86d09629ad909ddc4bf5c7\",\n \"score\": \"0.6459062\",\n \"text\": \"public function show()\\n {\\n $id = auth()->user()->id;\\n $user = DB::table('employees')\\n ->join('logins', 'logins.id', '=', 'employees.log_id')\\n ->join('roles', 'roles.id', '=', 'logins.role')\\n ->where('logins.id', $id)\\n ->first();\\n\\n return view('admin.profile')->with('user', $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bbac628abb0d82d0f8be19705cdda16\",\n \"score\": \"0.6445298\",\n \"text\": \"public function show()\\n {\\n// $posts = User::find(1)->rooms;\\n $rooms = auth()->user()->rooms()->get();\\n\\n return view('dashboard.users', compact('rooms'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d008354da19e0460c95df6201842ed63\",\n \"score\": \"0.6443076\",\n \"text\": \"public function showUser() {\\n\\n\\t\\t$employees = TableRegistry::get('Employees');\\n\\t\\t$query = $employees->find('all')->toArray();\\n\\t\\t$this->set('employees',$query);\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0dd4997da4be5e881b089b4f3b0a776\",\n \"score\": \"0.64135176\",\n \"text\": \"public function showUser($id = null){\\n if($id === null){\\n return HelpDeskController::showUser(Auth::id());\\n }\\n $user = User::find($id);\\n $tickets = $user->tickets;\\n $roles = Role::all();\\n return view('auth/show', compact(\\\"user\\\", \\\"tickets\\\", \\\"roles\\\"));\\n //todo: show user\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d30635dbe2539ed839f42db992257762\",\n \"score\": \"0.64126086\",\n \"text\": \"public function show (Request $request)\\n\\t{\\n\\t\\treturn $request->user();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"521a6d9f86a27f9ddc3ade16e1b6af4e\",\n \"score\": \"0.6409492\",\n \"text\": \"public function userPrivilagesGET() {\\n $all_users = User::all();\\n $all_privilage_users = PrivilageUserRelation::all();\\n $all_links = Links::select('id', 'name')\\n ->get();\\n return view('admin.userPrivilage')->with('all_users', $all_users)->with('all_privilage_users', $all_privilage_users)->with('all_links', $all_links);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e54255c51644311a187eea5f298b813\",\n \"score\": \"0.6394446\",\n \"text\": \"public function show()\\n {\\n $responsible = Auth::user();\\n \\n return response()->json(['status' => 'success', 'data' => $responsible], 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ffd7e75639973bb217e34bfca9aa46f\",\n \"score\": \"0.63859123\",\n \"text\": \"public function index()\\n {\\n //\\n\\t\\t$u = User::with('dept.company.location')->paginate(5);\\n\\t\\treturn view('auth.list')->with('user', $u);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3db7bf9dcd7c29b990a9d9cf6c0bacb\",\n \"score\": \"0.6339388\",\n \"text\": \"public function linked()\\n\\t{\\n\\t\\t$this->current_user or redirect('users/login/social/linked');\\n\\t\\t\\n\\t\\t$authentications = $this->authentication_m->get_many_by(array(\\n\\t\\t\\t'user_id' => $this->current_user->id,\\n\\t\\t));\\n\\t\\t\\n\\t\\t// \\n\\t\\t$this->template->build('linked', array(\\n\\t\\t\\t'authentications' => $authentications,\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"160f13d1e93d117721a59854e1e7c702\",\n \"score\": \"0.63231176\",\n \"text\": \"public function show()\\n {\\n return view('shop.cabinet.user.show')->with([\\n 'user' => auth()->user()\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"324a9071a14ea87218a7260c60d8bc2f\",\n \"score\": \"0.6312494\",\n \"text\": \"public function show($id,Request $request)\\n {\\n $user = User::findOrFail($id);\\n $user->getDirectPermissions();\\n $user->roles;\\n if($user->is_admin == 1){\\n return Inertia::render('Users/ShowAdminUsers',[\\n 'user' => $user\\n ]);\\n }\\n return Inertia::render('Users/ShowClientUsers',[\\n 'user' => $user\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86eddcd60abb028d96aca24132741d1c\",\n \"score\": \"0.630623\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t$user = User::findOrFail($id);\\n\\t\\t$roles = $user->getRoleNames(); // Returns a collection\\n\\t\\t$permissions = $user->getAllPermissions()->groupBy('groupings');\\n\\n\\t\\treturn view('users.show', compact('user', 'permissions', 'roles'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f86e1139f4283be6802839a5f97606c\",\n \"score\": \"0.6303121\",\n \"text\": \"public function show()\\n {\\n $this->middleware('auth');\\n $viewusers = user::all()->where('role','!=','admin');\\n return view('/viewusers')->with('viewusers',$viewusers);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3c6c69b55cf720cfa09890727fd54df\",\n \"score\": \"0.62980354\",\n \"text\": \"public function detail(Request $request){\\n $data = AdministredController::getAdministredBy(auth()->user()->administred_id);\\n /* dd($data,auth()->user()->administred_id,auth()->user());*/\\n return view(\\\"frontend.profile.detail\\\",compact('data'));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fbf5c34f54c48186983dce51aae48a5\",\n \"score\": \"0.62681246\",\n \"text\": \"public function user() {\\n\\t\\treturn view ('user.landing');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84e8dc6d8e79c83c729847452d68daa4\",\n \"score\": \"0.6259673\",\n \"text\": \"public function show()\\n {\\n return JsonResponse::successObject($this->userService->show(request()->user()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86f3a62177ea2d86885e5d29b8e1d844\",\n \"score\": \"0.6245909\",\n \"text\": \"public function show()\\n\\t{\\n\\t\\treturn view('admin/viewUser')->with(['data' => user_master::where('u_type', 2)->get(), 'branch' => branchMaster::get()]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f10927f50d32326a8b0d59601188eafd\",\n \"score\": \"0.6245478\",\n \"text\": \"public function show(){\\n $user = Auth::user();\\n return view('user.profile')->with('user', $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdf32546aba858c6ef20a753613ceec1\",\n \"score\": \"0.62385887\",\n \"text\": \"public function index()\\n {\\n if(auth()->user()->hasRole('super admin')){\\n $us=User::all();\\n }\\n \\n else{\\n $us=auth()->user()->members()->with('members')->get();\\n }\\n \\n return view('admin.user.all_user',compact('us'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9b2e67087bb2bdea7207490cc418fe9\",\n \"score\": \"0.62287444\",\n \"text\": \"public function authorize()\\n {\\n return Service::getInstance()->general->alias->belongsToUser($this->route('alias'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecb560ce10ff0f7392f56d2bea101bbf\",\n \"score\": \"0.6221432\",\n \"text\": \"public function profile() {\\n return view('users.show')->withUser(app('user'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1647ea0806b7cf4a02c11b546557e756\",\n \"score\": \"0.6213763\",\n \"text\": \"public function show()\\n {\\n //dd('show');\\n $data = Users::all();\\n $user = Auth::user();\\n $userId = $user->role;\\n //return $data;\\n //echo '
'; print_r(compact('data')); exit;\\n //$data = DB::table('users')->where('id', '$id'); \\n \\n //return view('user', ['lessions' => $data]);\\n return view('user', compact('data', 'userId'));\\n //return view('user')->with('id', $ids)->with('lessions', $lessions);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c77dd5049bbec2faecbb07009ed130fc\",\n \"score\": \"0.6212805\",\n \"text\": \"public function show()\\n {\\n //Authentication granted\\n $current_user = Auth::user();\\n return view('user.profile-extended')->with('user', $current_user);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcd26de77ce3f0580a99facc343e0a3f\",\n \"score\": \"0.620337\",\n \"text\": \"public function view_users()\\r\\n\\t{\\r\\n\\t\\t// Display\\r\\n\\t\\t// Load template\\r\\n\\t\\tTemplate::set('self', $this->_self);\\r\\n\\t\\tinclude(BLUPATH_TEMPLATES.'/profile/listing.php');\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"881147ad050992813d37a7730ecf3fab\",\n \"score\": \"0.6203004\",\n \"text\": \"public function show($id)\\n {\\n // if (!Gate::allows('users_manage')) {\\n // return abort(401);\\n // }\\n $roles = Role::get();\\n\\n $user = User::findOrFail($id);\\n //$login = UserLogin::where('user_id',$id)->first();\\n $login = UserLogin::where('user_id',$user->id)->first();\\n $user_cards = null;\\n $user_addresses = UserAddress::where('user_id',$id)->get();\\n \\n\\n return view('admin.users.show', compact('user', 'roles' , 'login','user_cards','user_addresses'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bdf9fa18469ffa1b492e86ca8473e59\",\n \"score\": \"0.6202039\",\n \"text\": \"public function showbyuser()\\n {\\n //\\n if (Auth::user())\\n { \\n $userid=Auth::user()->id;\\n $items= ArticleModel::Where(\\\"user_id\\\",$userid)->get();\\n\\n\\n return view(\\\"articles/showbyuser\\\",[\\\"items\\\"=>$items]);\\n }\\n else return view('auth.login');\\n\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e9adb360666815a15ca875817057848\",\n \"score\": \"0.62018526\",\n \"text\": \"public function index()\\n {\\n $relations = auth()->user()->relations;\\n\\n return view('relation.index', compact('relations'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a0e797741193302cc03e973a1155163\",\n \"score\": \"0.61963505\",\n \"text\": \"public function index()\\n {\\n $user = User::where('id', Auth::user()->id)->with(['role', 'institute'])->first();\\n return view('author.profile.index', compact('user'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bbbfe4f0bf09a94f7fdd67ebe31275c\",\n \"score\": \"0.6196305\",\n \"text\": \"public function show($id)\\n {\\n // --auth--\\n if (Auth::user()->role == \\\"owner\\\" || Auth::user()->role == \\\"manager\\\") {\\n $user = User::find($id);\\n } else {\\n return redirect('/')->with('error','Unauthorized Page');\\n }\\n\\n if ($user->role == \\\"owner\\\" && Auth::user()->role == \\\"owner\\\") {\\n return view('pages.users.userprofile') ->with('user',$user);\\n } else if ($user->role != \\\"owner\\\") {\\n return view('pages.users.userprofile') ->with('user',$user);\\n } else {\\n return redirect('/admin')->with('error','Unauthorized Page');\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2df05187ce97aa28e08f034fbf4ec32\",\n \"score\": \"0.6193886\",\n \"text\": \"public function index()\\n {\\n\\n $userId = Auth::id();\\n\\n $userAuth = User::find($userId);\\n\\n $meetings = Meeting::orderBy('sensibility', 'desc')->paginate(10);\\n\\n $meetingsStaff = Meeting::orderBy('sensibility', 'desc')->where('meetIdHost', '=', Auth::user()->idUser)->paginate(10);\\n\\n $user= User::all()->load('meetingHost');\\n\\n \\n \\n \\n\\n \\n\\n if (Auth::user()->role()==true) {\\n return view('meetingsSecurityView.index', compact('meetings', 'user', 'visitor'));\\n }\\n else\\n return view('meetings.index', compact('meetingsStaff', 'user', 'visitor', 'userAuth'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a766608d3f149e3eeb0dd460d629882\",\n \"score\": \"0.61877286\",\n \"text\": \"public function index()\\n {\\n $dataUser = User::all();\\n return view('owner.akun', compact('dataUser'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d533d568eaaf25eb65bd26555ae3f840\",\n \"score\": \"0.6174966\",\n \"text\": \"public function userListings()\\n {\\n $listings = Listing::where('userID', Auth::user()->userID)\\n ->with(['listingPhotos'])\\n ->orderBy('make')\\n ->get();\\n return view('pages.user-listings',['listings' => $listings]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a9b3c5cd2af2444bf84ba94995bed12\",\n \"score\": \"0.6172171\",\n \"text\": \"public function showProfile()\\n\\t{\\n\\t\\t$u = Auth::user();\\n\\t\\t$dogs = $u->getMyDogs();\\n\\t\\treturn view('userProfile', ['user'=>$u,'dogs'=>$dogs]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75572cb6db6634cec4527e1c4a40ed20\",\n \"score\": \"0.6170099\",\n \"text\": \"public function index()\\n {\\n $currentuser = User::where('rut', Auth::user()->rut)->first();\\n$user = User::all();\\n //return $user = DB::collection('users')->where('rut',Auth::user()->rut)->first()->get();\\n // && $users->givePermissionTo('show users');\\n\\n // return $userInfo = Auth::user()->id;\\n\\n // return $user->hasPermissionTo('edit articles');\\n //return $role = Role::findByName('Visualizador');\\n\\n return view('home')->with('user', $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4d7181de842ed142020846960d5e801\",\n \"score\": \"0.61681885\",\n \"text\": \"public function index()\\n {\\n // return User::all();\\n Gate::authorize('view', 'users');\\n $lstUsr = User::with('role')->paginate();\\n return UserResource::collection($lstUsr);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49839c9bffc6584144ed7938db3ce11e\",\n \"score\": \"0.616539\",\n \"text\": \"public function showMe()\\n {\\n return new AuthorResource(Auth::user());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"841fa75111cca382957f5e33daced6c5\",\n \"score\": \"0.61639345\",\n \"text\": \"public function show($id)\\n {\\n //View a usergroup -- superadmin only\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8caabb295863bd7a92733200486ec09\",\n \"score\": \"0.6162807\",\n \"text\": \"public function show()\\n {\\n \\n return view('admin.users.my-profile');\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"efdd47c429dcb45f5b388eed5dd9132e\",\n \"score\": \"0.61583215\",\n \"text\": \"public function show(Request $request)\\n {\\n $id_user = Auth::id();\\n $user = DB::table('users')\\n ->where('id', $id_user)\\n ->first();\\n\\n $people = DB::table('people')\\n ->join('users', 'users.people_id', '=', 'people.id')\\n ->where('people.id', '=', $user->people_id)\\n ->first();\\n\\n return view('user.viewprofile', compact(['user','people']));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06f42f3be5105a43e8871fe4d80e93bf\",\n \"score\": \"0.61455\",\n \"text\": \"public function show($id) {\\n $current_user_object = JWTAuth::parseToken()->authenticate();\\n if ( !($current_user_object->isActiveUser() && ($id==$current_user_object->id)) && !($current_user_object->hasRule('user_show')) ) {\\n return $this->setStatusCode(403)->respondWithError('Forbidden');\\n }//if ( !($current_user_object->isActiveUser() && ($id==$current_user_object->id)) && !($current_user_object->hasRule('user_show')) )\\n return $this->UserModel->findOrFail($id)->getStandardJsonFormat();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"421e16cb35b310fe898f1b88aa5362d2\",\n \"score\": \"0.61447597\",\n \"text\": \"public function show()\\n {\\n return $this->response->item(\\n auth()->user(),\\n new UserTransformer()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ebb8a65dbf6bba9fca529ec67dbc820\",\n \"score\": \"0.61297464\",\n \"text\": \"public function show(User $user){\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36b7f2ac8a57e6ffc1cce35f6ad404f7\",\n \"score\": \"0.61272115\",\n \"text\": \"public function show()\\n {\\n return $this->response(\\n $this->transform->item(Auth::guard('api')->user(), new UserTransformer)\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d465be294d88c29aa696886742e082b0\",\n \"score\": \"0.6120978\",\n \"text\": \"public function show($id)\\n {\\n if (!Sentry::check()) {\\n return Redirect::to('/')->withErrors('Please log in the website to continue');\\n }\\n if ($id == 'me') {\\n $my_votes = UserVote::where('user_id', '=', Sentry::getUser()->id)\\n ->orderBy('created_at', 'DESC')\\n ->get();\\n\\n $user = User::where('users.id', '=', Sentry::getUser()->id)\\n ->join('profiles', 'users.id', '=', 'profiles.user_id')\\n ->first();\\n\\n if (Request::ajax()) {\\n // If the request is AJAX, return only the list of parties without other html\\n return View::make('site._partials.user-dashboard')\\n ->with('title', 'User Dashboard')\\n ->with('user', $user)\\n ->with('votes', $my_votes);\\n\\n } else {\\n return View::make('site.users.dashboard')\\n ->with('title', 'User Dashboard')\\n ->with('user', $user)\\n ->with('votes', $my_votes);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a2370943d3e74ecf1c10262e859db7f\",\n \"score\": \"0.6120262\",\n \"text\": \"public function show($id) {\\n //$user = User::find($id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a93a15699316fa0332255c04f8eff9d8\",\n \"score\": \"0.61164105\",\n \"text\": \"public function show(Request $request)\\n {\\n return response()->json($request->user());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"469b7d04b2679996b5eec8ec833c190e\",\n \"score\": \"0.6115875\",\n \"text\": \"public function profileshow()\\n {\\n return auth('api')->user()->profile;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a7168dbffdb6bdce1b72ef6d91e3e52\",\n \"score\": \"0.61098576\",\n \"text\": \"public function showUsers(Request $request){\\n $this ->authorize('admin', $request->user());\\n\\n //get the users and pass it down to the view\\n $users = User::paginate(6);\\n return view(\\\"adminViews.userViews.manageUsers\\\",\\n ['users' => $users]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02d6556d4152ad38172cdaf2d887d4ab\",\n \"score\": \"0.61069715\",\n \"text\": \"public function show()\\n {\\n $users=User::all();\\n return view('backend.supervisor.viewmember',compact('users'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f64624e315021881b35cb104947cb66d\",\n \"score\": \"0.6104561\",\n \"text\": \"public function show($id)\\n {\\n if(auth()->user()->role->name == 'Admin'){\\n $request = URequest::findOrFail($id);\\n return view('user.show', compact('request'));\\n } elseif(auth()->user()->role->name == 'Employee'){\\n $request = auth()->user()->requests()->findOrFail($id);\\n return view('user.show', compact('request'));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12e8982226d458eabe9bfd095ccfe663\",\n \"score\": \"0.6099354\",\n \"text\": \"public function index()\\n {\\n return Auth::user()->entries;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c76b851b8e91827913f3293b95188d5\",\n \"score\": \"0.60975474\",\n \"text\": \"public function indexAction()\\r\\n {\\r\\n $division = $this->get('security.context')->getToken()->getUser();\\r\\n return array('user' => $division);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32060ec1e60835513d0c1e1a624b2dd1\",\n \"score\": \"0.60911196\",\n \"text\": \"public function show()\\n {\\n if (Auth::check()) {\\n return view('myAccount/myAccount');\\n\\n } else {\\n\\n return redirect()->route('login'); //users that arent logged in should login first\\n\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e84d7631dbbe183aeaa158d30890bef5\",\n \"score\": \"0.6087426\",\n \"text\": \"public function index()\\n {\\n //$this->authorize('user.read');\\n if( Gate::denies('user.read') ){\\n return view(config('app.template').'.error.403');\\n }\\n\\n $users = User::join('karyawans', 'users.id', '=', 'karyawans.user_id')\\n ->with(['roles'])\\n ->where('users.active', 1)\\n ->select(['users.*', 'karyawans.nama'])->get();\\n $data = ['users' => $users];\\n return view(config('app.template').'.user.table', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e97c70028aeda164c083050cd1036d6\",\n \"score\": \"0.60864973\",\n \"text\": \"public function index()\\n {\\n return $this->repository->with(['owner', 'client'])->findWhere(['owner_id'=>Authorizer::getResourceOwnerId()]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa76f387a19fee42feba47e97e33db7a\",\n \"score\": \"0.60853964\",\n \"text\": \"public function index()\\n {\\n $user = User::with('kelas','level')->get();\\n return view('admin.user.index',compact('user'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4296542dc1151ccd3ab6623b121d2651\",\n \"score\": \"0.6081445\",\n \"text\": \"public function showUsers()\\n {\\n $userListing = $this->user->fetchUsersAndRelatedData();\\n $allRoles = $this->role->fetchRoles(['id', 'name']);\\n $allCompanies = $this->company->fetchCompanies(['id', 'name']);\\n $allStates = $this->states->getStates();\\n return view('users/users', ['companies' => $allCompanies, 'roles' => $allRoles, 'states' => $allStates, 'userListing' => $userListing]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90fa69f16a1e33eac1bab0f3a6d77d06\",\n \"score\": \"0.60781276\",\n \"text\": \"public function getShow()\\n {\\n $entities = Entity::forAuthUser()->orderBy('name')->paginate(20);\\n\\n return view('admin.entities.index')\\n ->with('entities', $entities);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0cae7f80b8e0b297114d8130978f79e\",\n \"score\": \"0.60732406\",\n \"text\": \"public function useraccess(){\\n return $this->belongsTo('App\\\\Models\\\\User','approved_by')->where('company_id_fk',Sentinel::getUser()->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cccaad3bbc5a42547a6b99bbbbe75fe\",\n \"score\": \"0.6065127\",\n \"text\": \"public function show()\\n {\\n $id = Auth()->id();\\n $user = User::find($id);\\n return view('admin.profiles.index', compact('user'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43ad7189df3666c2a688a00435e99d5d\",\n \"score\": \"0.60576993\",\n \"text\": \"public function user_view()\\n {\\n $data['client_list'] = $this->MainModel->selectAll('client_details', 'client_name');\\n $data['country'] = $this->MainModel->selectAll('countries', 'name');\\n $data['role'] = $this->MainModel->selectAll('roles', 'role');\\n $this->load->view('layout/header');\\n $this->load->view('layout/sidenav');\\n $this->load->view('template/users', $data);\\n $this->load->view('layout/footer');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05faee85dc536e27cda6c13bd0ba7497\",\n \"score\": \"0.60573494\",\n \"text\": \"public function show($id)\\n { \\n $user = User::find($id);\\n $rol_user = $user->rol_id;\\n\\n if($rol_user == 1){\\n $centro = Centro::DirectorCentro($user->id);\\n $aulas = Centro::AulasCentro($centro->id);\\n return view ('usuarios.show')->with('user',$user)->with('centro',$centro)->with('aulas',$aulas);\\n }\\n\\n if($rol_user == 2){\\n $centros = Aula::agrupar_centros_aulas_por_profesor($id);\\n return view ('usuarios.show')->with('user',$user)->with('centros',$centros);\\n }\\n\\n if($rol_user == 3){\\n $centros = Nino::agrupar_ninos_tutores_por_centro($id);\\n return view ('usuarios.show')->with('user',$user)->with('centros',$centros);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c10f8875ff7776060844f69cf91d11dc\",\n \"score\": \"0.6057008\",\n \"text\": \"public function logged_user()\\n {\\n return $this->belongsTo(User::class, 'user_id', 'id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b523156d255978fd750f28377740738f\",\n \"score\": \"0.6055357\",\n \"text\": \"public function user() {\\n \\n // Verify if the app is enabled\\n if ( !get_option('app_posts_enable') || !plan_feature('app_posts') ) {\\n show_404();\\n }\\n \\n // Instantiate the class\\n (new MidrubAppsCollectionPostsControllers\\\\User)->view();\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70b46c45d7c0c3a3038d303f80787d91\",\n \"score\": \"0.60524976\",\n \"text\": \"public function index()\\n {\\n return auth()->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da95cf185ef86ec2088c12769a1e9322\",\n \"score\": \"0.60515213\",\n \"text\": \"public function show()\\n {\\n if(Auth::user()->department == \\\"Technical Team\\\")\\n {\\n $users = DB::table('users')->where('position', '!=', 'Super Admin')->where('department', 'Technical Team')->get(); \\n }\\n elseif(Auth::user()->department == \\\"Lesson Support\\\")\\n {\\n $users = DB::table('users')->where('position', '!=', 'Super Admin')->where('department', 'Lesson Support')->get();\\n }\\n else\\n {\\n $users = DB::table('users')->where('position', '!=', 'Super Admin')->get(); \\n }\\n\\n\\n return view('/admin/userlist', ['users' => $users]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ba5f49e706a6fcb383bb34adc0eb816\",\n \"score\": \"0.60509956\",\n \"text\": \"public function index()\\n {\\n if (Auth::check()) {\\n $user = Auth::user();\\n $parkings = Parking::all();\\n return view('parkings.index', compact('user','parkings'));\\n\\n /*if(Auth::user()->typeOf == 'webadmin'){\\n //echo \\\"si\\\";\\n //$users = $this->list();\\n return view('parkings', compact('users'));\\n }else{\\n return view('parkings.index', compact('user'));\\n } */\\n }else {\\n return view('/home');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99fb295f3f0da5f85a50aab7ddb7eeff\",\n \"score\": \"0.60477173\",\n \"text\": \"public function index()\\n {\\n if (\\\\Gate::allows('isAdmin')) {\\n return User::latest()->paginate(15);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"581bd9f2bb7af110121ed61853bad27f\",\n \"score\": \"0.60451066\",\n \"text\": \"public function index(Request $request)\\n {\\n $id = Auth::guard('searcher')->user()->id;\\n\\n // getting data of searcher which is currently logged in\\n $searchers = Searcher::where('id',$id)->get();\\n\\n return view('searcherProfileView',compact('searchers'));\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1e53da571431a93605179466767860f\",\n \"score\": \"0.60449886\",\n \"text\": \"public function index()\\n {\\n\\n $users = User::with('user_departs','hands')->latest()->paginate(15);\\n $users->load('user_departs','hands');\\n\\n// $users = User::latest()->paginate(15);\\n\\n return view('admin.user.index', compact('users'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a603ec0bb26108cd8231c5712fe87cc\",\n \"score\": \"0.60448515\",\n \"text\": \"function showUsers() {\\n $users = $this->model->getAll();\\n $cantidad = count($users);\\n $this->view->printUsers($users, $cantidad);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49bc16c4308763ec42fbf37debae98f1\",\n \"score\": \"0.604136\",\n \"text\": \"public function show(User $user)\\r\\n {\\r\\n //\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49bc16c4308763ec42fbf37debae98f1\",\n \"score\": \"0.604136\",\n \"text\": \"public function show(User $user)\\r\\n {\\r\\n //\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f85399e9fdff7b46a11c25caf21164e\",\n \"score\": \"0.60399693\",\n \"text\": \"public function show($id)\\n {\\n $user = $this->user->find($id);\\n $permission = Permission::orderBy('group','desc')->get();\\n return view('admin.user.show',compact('user','permission'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"231f2fd9f804228d7f565a695bf4e505\",\n \"score\": \"0.6038127\",\n \"text\": \"public function showUserAction()\\n {\\n $user = $this->get('security.context')->getToken()->getUser();\\n return $this->render('AwaStoreBundle:Store:showUser.html.twig',array('user'=>$user));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d05681fb0003482a4d2a87d80288532\",\n \"score\": \"0.6034926\",\n \"text\": \"public function index()\\n {\\n\\n $medecins = medecin::latest()->paginate(5);\\n return view('medecin.auth.show', compact('agences', 'medecins'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6de93ed364e0cf783b62069b17d3e90e\",\n \"score\": \"0.603424\",\n \"text\": \"public function show()\\n {\\n $user = DB::table('signs')\\n ->orderBy('id', 'DESC')\\n ->paginate(1);\\n\\n \\n \\n \\n\\n return view('show', compact('user'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f99499d0d0b4342d92bd31f16ac7a98f\",\n \"score\": \"0.6032756\",\n \"text\": \"public function show(User $user)\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f99499d0d0b4342d92bd31f16ac7a98f\",\n \"score\": \"0.6032756\",\n \"text\": \"public function show(User $user)\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b57d353e348d3a18480b811578cc3826\",\n \"score\": \"0.6029842\",\n \"text\": \"public function index()\\n {\\n //\\n $id = auth()->user()->id;\\n $professor = \\\\App\\\\Professor::find($id);\\n\\n return view('auth.profile',compact('professor') );\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8fd2bdaaf93f755a59ba3a4ac20640e\",\n \"score\": \"0.6029698\",\n \"text\": \"public function show(Request $request)\\n {\\n $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');\\n $em = $this->getDoctrine()->getManager()->getRepository(User::class);\\n $users = $em->findAll();\\n\\n return $this->render('security/usersList.html.twig', array(\\n 'users' => $users,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e01728c18d138b8534a362b5cd61f8d\",\n \"score\": \"0.6029159\",\n \"text\": \"public function show($id)\\n {\\n $user = $this->user->find($id);\\n $user_role = $user->roles->first()->name;\\n $imgDest = env('PATH_PROF_THUMB_IMG');\\n\\n return view('protected.admin.show_user')->withUser($user)->withUserRole($user_role)->with('imgDest',$imgDest);\\n // $user = $this->user->find($id);\\n // $this->roles = Sentinel::getRoleRepository()->createModel();\\n // $user_role = $user->roles->first()->name;\\n // $roles = $this->roles->paginate();\\n // $destinationPath = '/assets/img/avatars/thumbnails/';\\n // return view('protected.admin.show_user')->withUser($user)->withUserRole($user_role)->withRoles($roles)->with('destinationPath',$destinationPath);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"892d74ca1d4fe381669bc27bb6c63361\",\n \"score\": \"0.60282713\",\n \"text\": \"public function index()\\n {\\n \\n $user_id = auth()->user()->id; // Get the user_id using the auth() method\\n $user = User::find($user_id); // Get the user by looking into de User model using the user_id\\n\\n $data = array(\\n 'posts' => $user->posts,\\n 'name' => $user->name\\n ); \\n\\n return view('home')->with($data); //Since we already have defined the relationship\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f567b18641506ea69d2b0dbf64e12a3\",\n \"score\": \"0.60258996\",\n \"text\": \"public function getShow($id)\\n {\\n $group = DB::table('groups')\\n ->join('users', 'groups.user_id', '=', 'users.id')\\n ->where('groups.id', $id)\\n ->select(\\n 'groups.*',\\n 'users.name as creator'\\n )\\n ->get();\\n\\n $members = DB::table('users as U')\\n ->join('users_groups as UG', 'U.id', '=', 'UG.user_id')\\n ->where('UG.group_id', $id)\\n ->select(\\n 'U.name as name'\\n )\\n ->get();\\n return view('groups.profile')->with(['group'=>$group, 'members'=>$members]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ea039a2c1ef4901d6e67dff79bc4581\",\n \"score\": \"0.6025823\",\n \"text\": \"public function user()\\n {\\n return $this->belongsTo($this->getAuthModelName(), 'user_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4369b54b21c0fb944b1d3d910a2b5032\",\n \"score\": \"0.6024616\",\n \"text\": \"public function owner($id){\\n $owners = \\\\App\\\\Models\\\\Animal::find($id)->myOwner;\\n return view('owner.show', ['owners' => $owners]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"583e43fba9b1ef2e93cd319e23cca519\",\n \"score\": \"0.60245866\",\n \"text\": \"public function index()\\n {\\n $owner = DB::table('owner_list')->select('owner_list.*' , 'county_in_us.county_name')\\n ->join('county_in_us' , 'owner_list.county_code', '=', 'county_in_us.county_code')\\n ->where('user_code' , auth()->user()->id)\\n ->get();\\n return view('owner')->with('owner',$owner);\\n\\n //return view('owner');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8442218273b4e735b5352c0a63028c0c\",\n \"score\": \"0.60214245\",\n \"text\": \"public function showData(){\\n\\t\\t\\t $principalMsg = TeacherMessage::all();\\n\\n\\t\\t return view('admin.principal.show', compact('principalMsg'));\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"376cbafd8d20b177537018c0dd2c4008\",\n \"score\": \"0.60131264\",\n \"text\": \"public function index()\\n {\\n return UserResource::collection($this->getUserModel()->with('companies:id,name,active')->get());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d3d83176550f58ce5e45a0bcf7f71b3\",\n \"score\": \"0.6012141\",\n \"text\": \"public function show()\\n {\\n $users = User::orderBy('status', 'desc')->get();\\n \\n return view('admin.show_users', compact('users'));\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a98ffb7041ee488f05e5f77210299c1\",\n \"score\": \"0.6008556\",\n \"text\": \"public function index()\\n {\\n $users = $this->user->getAll();\\n $admin = Sentinel::findRoleByName('Admins');\\n $destination_prof_img = env('PATH_PROF_THUMB_IMG');\\n return view('protected.admin.list_users')->withUsers($users)->withAdmin($admin)->with('destination_prof_img', $destination_prof_img);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":583,"cells":{"query_id":{"kind":"string","value":"972499302c169f21ea61b70e96990c89"},"query":{"kind":"string","value":"Store a newly created resource in storage."},"positive_passages":{"kind":"list like","value":[{"docid":"5451c181f757dae340c1f306c524dcdf","score":"0.0","text":"public function store(Request $request)\n {\n \n $cep = $request[\"cep\"];\n\n if(!strpos($cep, '-')){\n $cep1 = substr($cep, 0, 5);\n $cep2 = substr($cep, 5, strlen($cep));\n $cep = $cep1 .'-'.$cep2;\n }\n\n $imovelCriado = Imovel::create([\n 'endereco' \t\t\t => $request[\"endereco\"],\n 'cep' \t\t\t => $dep,\n 'proprietario' \t\t\t=> $request[\"proprietario\"],\n 'tipo_id' \t\t\t => $request[\"tipo_id\"],\n 'estado_id' \t\t\t=> $request[\"estado_id\"],\n 'municipio_id' \t\t\t=> $request[\"municipio_id\"],\n 'bairro_id' \t\t\t=> $request[\"bairro_id\"],\n ]);\n return response()->json($imovelCriado);\n }","title":""}],"string":"[\n {\n \"docid\": \"5451c181f757dae340c1f306c524dcdf\",\n \"score\": \"0.0\",\n \"text\": \"public function store(Request $request)\\n {\\n \\n $cep = $request[\\\"cep\\\"];\\n\\n if(!strpos($cep, '-')){\\n $cep1 = substr($cep, 0, 5);\\n $cep2 = substr($cep, 5, strlen($cep));\\n $cep = $cep1 .'-'.$cep2;\\n }\\n\\n $imovelCriado = Imovel::create([\\n 'endereco' \\t\\t\\t => $request[\\\"endereco\\\"],\\n 'cep' \\t\\t\\t => $dep,\\n 'proprietario' \\t\\t\\t=> $request[\\\"proprietario\\\"],\\n 'tipo_id' \\t\\t\\t => $request[\\\"tipo_id\\\"],\\n 'estado_id' \\t\\t\\t=> $request[\\\"estado_id\\\"],\\n 'municipio_id' \\t\\t\\t=> $request[\\\"municipio_id\\\"],\\n 'bairro_id' \\t\\t\\t=> $request[\\\"bairro_id\\\"],\\n ]);\\n return response()->json($imovelCriado);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"08bf051ddd8fb321ee757b920958e19f","score":"0.7097883","text":"public function save()\n {\n if($this->saved()) $this->client->put($this->router->path($this->_id), $this->attributes);\n else {\n // create the resource\n $response = $this->client->post($this->router->path(), $this->attributes);\n $this->_id = $response['id'];\n $this->exists = true;\n }\n }","title":""},{"docid":"1d53a1b85330dbd54b2110d38f49c072","score":"0.6818628","text":"public function store() {\n\t\treturn $this->attemptEdit(new Resource(), true);\n\t}","title":""},{"docid":"c3547b2773825a7810dd2d7be213c014","score":"0.6803361","text":"public function store()\n {\n try\n {\n $this->execute('Chenkacrud\\Resources\\ProcessResourceCommand');\n } catch (\\Exception $e)\n {\n dd('error');\n }\n }","title":""},{"docid":"6842710d2e1af6b300f62eeb2e1bd88e","score":"0.67699987","text":"public function store(StoreResourceRequest $request)\n {\n $resource = new Resource;\n $resource->fill($request->all());\n\n if ($request->has('audio')) {\n $resource->audio = $request->audio->store('resources');\n }\n\n if ($request->has('document')) {\n $resource->document = $request->document->store('resources');\n }\n\n $resource->saveOrFail();\n\n return $this->api_success([\n 'data' => new ResourceResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }","title":""},{"docid":"e51fa81f584f17798f0483bf328bf426","score":"0.6717249","text":"public function store()\n\t{\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\t\t//$input = Input::only(array_keys($this->resource->getFillableLabels())); //More safe, less convenient\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}","title":""},{"docid":"42778db7569f0d4906b7ddc48c115b07","score":"0.67089736","text":"public function store()\n\t{ \n\t\t$resource = $this->resourceRepository->newResource();\n\t\t$manager = new ResourceManager($resource, Input::all());\n\n\t\t$manager->save();\n\t\t\n\t\treturn Redirect::route('resource')->with('successMessage', 'El recurso se ha guardado con éxito.');\n\t}","title":""},{"docid":"ffb15df04a92a2bd0c39d006dbfccb17","score":"0.6673232","text":"public function store()\n {\n return $this->okResponse(\n new $this->resource(\n $this->service->store()\n )\n );\n }","title":""},{"docid":"bf05263acc6d31d87c9ed0ed323947e0","score":"0.66469085","text":"public function store(string $storagePath): self;","title":""},{"docid":"883aa81cab86540535ca6f5ce9f06662","score":"0.6598401","text":"public function store()\n {\n // Check whether the object has ever been stored.\n if ($this->isNew) {\n Logger::get()->debug('Storing new entity ' . get_class($this) . '...');\n // Create the record. Get an ID back.\n $this->id = $this->getDataSource()->create($this->getFieldsData());\n // Store this object in the appropriate factory for further use.\n $this->getFactory()->registerEntity($this);\n } else {\n Logger::get()->debug('Updating entity ' . get_class($this) . \":{$this->id}...\");\n $this->getDataSource()->update($this->id, $this->getFieldsData());\n }\n\n // Once stored, the entity is no longer new.\n $this->isNew = false;\n }","title":""},{"docid":"682cf9175057b843f439d49243f35e43","score":"0.65583354","text":"public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->repository->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }","title":""},{"docid":"594b28921afbb12a0e454c67e44f856f","score":"0.6458668","text":"public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->service->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }","title":""},{"docid":"c4a6400468605f94c95346b88f6f2008","score":"0.6451185","text":"public function store(string $type, string $id, array $data) : StorageInterface;","title":""},{"docid":"e0d7c11298835364d1614d7fbef2631c","score":"0.6431917","text":"public function store()\n {\n $data = (new TagValidator)->validate(request()->all());\n $title = Arr::get($data, 'title');\n\n try {\n // Database exception happened so tag not created\n Tag::query()\n ->create([\n 'title' => $title,\n ]);\n\n } catch (QueryException $e) {\n dump('===== Error =====');\n dump($e->getMessage());\n dump('===== Error =====');\n }\n\n $tag = optional(Tag::query()\n ->where('title', $title)\n ->first());\n\n // Links will create with no tag linked to it\n collect(Arr::get($data, 'links'))\n ->each(function ($link) use ($tag) {\n Link::query()\n ->create([\n 'title' => Arr::get($link, 'title'),\n 'url' => Arr::get($link, 'url'),\n 'tag_id' => $tag->id\n ]);\n });\n\n\n return TagResource::make($tag->load('links'));\n }","title":""},{"docid":"5fe3bd8f1f685c0f002d9e7c106f705e","score":"0.6403747","text":"public function save($resource) {\n $stmt = $this->db->prepare(\"INSERT INTO resource (id, name, description, quantity, type)\n values (0,?,?,?,?)\");\n $stmt->execute(array($resource->getName(),$resource->getDescription(),$resource->getQuantity(),\n $resource->getType()));\n }","title":""},{"docid":"94e2137d286af73e1907a20ffd26c05f","score":"0.6390175","text":"public function store(Request $request)\n\t{\n $validator = $this->validate($request, [\n \t//\n ]);\n\n try\n {\n \t$newResource = $this->repository->createResource($request->all());\n\n } catch(\\Exception $exception)\n {\n $this->flashErrorAndReturnWithMessage($exception);\n }\n\n // returns back with success message\n flash()->success('Your resource was added!');\n return redirect()->action('Admin\\Catalogue\\ResourcesController@index');\n\t}","title":""},{"docid":"96db6e3f6a4372c5200ed59ea22c5213","score":"0.63900465","text":"public function create() {\n $this->storage_dir->touch();\n $this->storage_file->touch();\n }","title":""},{"docid":"55b375ea7c339e8f0e9c38919b53b1db","score":"0.63753176","text":"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }","title":""},{"docid":"e6a2ecff8be90a692566c0ac3bcd7773","score":"0.63658965","text":"public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}","title":""},{"docid":"03f9a1cfca780e7f0a082544fc457677","score":"0.6365053","text":"public function store()\r\n\t{\r\n\t\t//\r\n\t}","title":""},{"docid":"03f9a1cfca780e7f0a082544fc457677","score":"0.6365053","text":"public function store()\r\n\t{\r\n\t\t//\r\n\t}","title":""},{"docid":"03f9a1cfca780e7f0a082544fc457677","score":"0.6365053","text":"public function store()\r\n\t{\r\n\t\t//\r\n\t}","title":""},{"docid":"03f9a1cfca780e7f0a082544fc457677","score":"0.6365053","text":"public function store()\r\n\t{\r\n\t\t//\r\n\t}","title":""},{"docid":"03f9a1cfca780e7f0a082544fc457677","score":"0.6365053","text":"public function store()\r\n\t{\r\n\t\t//\r\n\t}","title":""},{"docid":"03f9a1cfca780e7f0a082544fc457677","score":"0.6365053","text":"public function store()\r\n\t{\r\n\t\t//\r\n\t}","title":""},{"docid":"8aec92e17d4ffebeefab6cee733407cb","score":"0.6354213","text":"public function store()\n\t{\n\t\t$data = Input::get();\n\n\t\t$item = $this->repo->create($data);\n\n\t\t$resource = new Item($item, $this->transformer);\n\n\t\treturn $this->response($resource, 201);\n\t}","title":""},{"docid":"fa7c0a35fe78f5965a80622583f4e02b","score":"0.6351566","text":"public function store(Request $request)\n {\n $requestData = $request->all();\n unset($requestData[\"_token\"]);\n $requestData = json_encode($requestData);\n ResourcesService::postToResourcesTable($requestData);\n SyncService::SyncResourcesTable();\n return redirect('admin/resources')->with('flash_message', 'Resource added!');\n }","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.63417834","text":"public function store()\n\t{\n\t\t//\n\t}","title":""}],"string":"[\n {\n \"docid\": \"08bf051ddd8fb321ee757b920958e19f\",\n \"score\": \"0.7097883\",\n \"text\": \"public function save()\\n {\\n if($this->saved()) $this->client->put($this->router->path($this->_id), $this->attributes);\\n else {\\n // create the resource\\n $response = $this->client->post($this->router->path(), $this->attributes);\\n $this->_id = $response['id'];\\n $this->exists = true;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d53a1b85330dbd54b2110d38f49c072\",\n \"score\": \"0.6818628\",\n \"text\": \"public function store() {\\n\\t\\treturn $this->attemptEdit(new Resource(), true);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3547b2773825a7810dd2d7be213c014\",\n \"score\": \"0.6803361\",\n \"text\": \"public function store()\\n {\\n try\\n {\\n $this->execute('Chenkacrud\\\\Resources\\\\ProcessResourceCommand');\\n } catch (\\\\Exception $e)\\n {\\n dd('error');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6842710d2e1af6b300f62eeb2e1bd88e\",\n \"score\": \"0.67699987\",\n \"text\": \"public function store(StoreResourceRequest $request)\\n {\\n $resource = new Resource;\\n $resource->fill($request->all());\\n\\n if ($request->has('audio')) {\\n $resource->audio = $request->audio->store('resources');\\n }\\n\\n if ($request->has('document')) {\\n $resource->document = $request->document->store('resources');\\n }\\n\\n $resource->saveOrFail();\\n\\n return $this->api_success([\\n 'data' => new ResourceResource($resource),\\n 'message' => __('pages.responses.created'),\\n 'code' => 201\\n ], 201);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e51fa81f584f17798f0483bf328bf426\",\n \"score\": \"0.6717249\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\\n\\t\\t//$input = Input::only(array_keys($this->resource->getFillableLabels())); //More safe, less convenient\\n\\t\\t$this->resource = $this->resource->fill($input);\\n\\n\\t\\treturn $this->persist(__FUNCTION__);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42778db7569f0d4906b7ddc48c115b07\",\n \"score\": \"0.67089736\",\n \"text\": \"public function store()\\n\\t{ \\n\\t\\t$resource = $this->resourceRepository->newResource();\\n\\t\\t$manager = new ResourceManager($resource, Input::all());\\n\\n\\t\\t$manager->save();\\n\\t\\t\\n\\t\\treturn Redirect::route('resource')->with('successMessage', 'El recurso se ha guardado con éxito.');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ffb15df04a92a2bd0c39d006dbfccb17\",\n \"score\": \"0.6673232\",\n \"text\": \"public function store()\\n {\\n return $this->okResponse(\\n new $this->resource(\\n $this->service->store()\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf05263acc6d31d87c9ed0ed323947e0\",\n \"score\": \"0.66469085\",\n \"text\": \"public function store(string $storagePath): self;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"883aa81cab86540535ca6f5ce9f06662\",\n \"score\": \"0.6598401\",\n \"text\": \"public function store()\\n {\\n // Check whether the object has ever been stored.\\n if ($this->isNew) {\\n Logger::get()->debug('Storing new entity ' . get_class($this) . '...');\\n // Create the record. Get an ID back.\\n $this->id = $this->getDataSource()->create($this->getFieldsData());\\n // Store this object in the appropriate factory for further use.\\n $this->getFactory()->registerEntity($this);\\n } else {\\n Logger::get()->debug('Updating entity ' . get_class($this) . \\\":{$this->id}...\\\");\\n $this->getDataSource()->update($this->id, $this->getFieldsData());\\n }\\n\\n // Once stored, the entity is no longer new.\\n $this->isNew = false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"682cf9175057b843f439d49243f35e43\",\n \"score\": \"0.65583354\",\n \"text\": \"public function store()\\n {\\n try {\\n\\n $fields = request()->all();\\n\\n if ($this->validator instanceof LaravelValidator)\\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\\n\\n if ($this->fileManager instanceof FileManager){\\n $files = request()->allFiles();\\n\\n foreach ($files as $key => $value) {\\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\\n }\\n }\\n\\n $createdData = $this->repository->create($fields);\\n\\n $response = [\\n 'message' => 'Resource created.',\\n 'data' => $createdData->toArray(),\\n ];\\n\\n if (request()->wantsJson()) {\\n\\n return response()->json($response);\\n }\\n\\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\\n\\n } catch (ValidatorException $e) {\\n if (request()->wantsJson()) {\\n return response()->json([\\n 'error' => true,\\n 'message' => $e->getMessageBag()\\n ]);\\n }\\n\\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"594b28921afbb12a0e454c67e44f856f\",\n \"score\": \"0.6458668\",\n \"text\": \"public function store()\\n {\\n try {\\n\\n $fields = request()->all();\\n\\n if ($this->validator instanceof LaravelValidator)\\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\\n\\n if ($this->fileManager instanceof FileManager){\\n $files = request()->allFiles();\\n\\n foreach ($files as $key => $value) {\\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\\n }\\n }\\n\\n $createdData = $this->service->create($fields);\\n\\n $response = [\\n 'message' => 'Resource created.',\\n 'data' => $createdData->toArray(),\\n ];\\n\\n if (request()->wantsJson()) {\\n\\n return response()->json($response);\\n }\\n\\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\\n\\n } catch (ValidatorException $e) {\\n if (request()->wantsJson()) {\\n return response()->json([\\n 'error' => true,\\n 'message' => $e->getMessageBag()\\n ]);\\n }\\n\\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4a6400468605f94c95346b88f6f2008\",\n \"score\": \"0.6451185\",\n \"text\": \"public function store(string $type, string $id, array $data) : StorageInterface;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0d7c11298835364d1614d7fbef2631c\",\n \"score\": \"0.6431917\",\n \"text\": \"public function store()\\n {\\n $data = (new TagValidator)->validate(request()->all());\\n $title = Arr::get($data, 'title');\\n\\n try {\\n // Database exception happened so tag not created\\n Tag::query()\\n ->create([\\n 'title' => $title,\\n ]);\\n\\n } catch (QueryException $e) {\\n dump('===== Error =====');\\n dump($e->getMessage());\\n dump('===== Error =====');\\n }\\n\\n $tag = optional(Tag::query()\\n ->where('title', $title)\\n ->first());\\n\\n // Links will create with no tag linked to it\\n collect(Arr::get($data, 'links'))\\n ->each(function ($link) use ($tag) {\\n Link::query()\\n ->create([\\n 'title' => Arr::get($link, 'title'),\\n 'url' => Arr::get($link, 'url'),\\n 'tag_id' => $tag->id\\n ]);\\n });\\n\\n\\n return TagResource::make($tag->load('links'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fe3bd8f1f685c0f002d9e7c106f705e\",\n \"score\": \"0.6403747\",\n \"text\": \"public function save($resource) {\\n $stmt = $this->db->prepare(\\\"INSERT INTO resource (id, name, description, quantity, type)\\n values (0,?,?,?,?)\\\");\\n $stmt->execute(array($resource->getName(),$resource->getDescription(),$resource->getQuantity(),\\n $resource->getType()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94e2137d286af73e1907a20ffd26c05f\",\n \"score\": \"0.6390175\",\n \"text\": \"public function store(Request $request)\\n\\t{\\n $validator = $this->validate($request, [\\n \\t//\\n ]);\\n\\n try\\n {\\n \\t$newResource = $this->repository->createResource($request->all());\\n\\n } catch(\\\\Exception $exception)\\n {\\n $this->flashErrorAndReturnWithMessage($exception);\\n }\\n\\n // returns back with success message\\n flash()->success('Your resource was added!');\\n return redirect()->action('Admin\\\\Catalogue\\\\ResourcesController@index');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96db6e3f6a4372c5200ed59ea22c5213\",\n \"score\": \"0.63900465\",\n \"text\": \"public function create() {\\n $this->storage_dir->touch();\\n $this->storage_file->touch();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55b375ea7c339e8f0e9c38919b53b1db\",\n \"score\": \"0.63753176\",\n \"text\": \"public function store()\\n {\\n if (!$this->id) { // Insert\\n $this->insertObject();\\n } else { // Update\\n $this->updateObject();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6a2ecff8be90a692566c0ac3bcd7773\",\n \"score\": \"0.63658965\",\n \"text\": \"public function store()\\r\\n\\t\\t{\\r\\n\\t\\t\\t//\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03f9a1cfca780e7f0a082544fc457677\",\n \"score\": \"0.6365053\",\n \"text\": \"public function store()\\r\\n\\t{\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03f9a1cfca780e7f0a082544fc457677\",\n \"score\": \"0.6365053\",\n \"text\": \"public function store()\\r\\n\\t{\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03f9a1cfca780e7f0a082544fc457677\",\n \"score\": \"0.6365053\",\n \"text\": \"public function store()\\r\\n\\t{\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03f9a1cfca780e7f0a082544fc457677\",\n \"score\": \"0.6365053\",\n \"text\": \"public function store()\\r\\n\\t{\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03f9a1cfca780e7f0a082544fc457677\",\n \"score\": \"0.6365053\",\n \"text\": \"public function store()\\r\\n\\t{\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03f9a1cfca780e7f0a082544fc457677\",\n \"score\": \"0.6365053\",\n \"text\": \"public function store()\\r\\n\\t{\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8aec92e17d4ffebeefab6cee733407cb\",\n \"score\": \"0.6354213\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$data = Input::get();\\n\\n\\t\\t$item = $this->repo->create($data);\\n\\n\\t\\t$resource = new Item($item, $this->transformer);\\n\\n\\t\\treturn $this->response($resource, 201);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa7c0a35fe78f5965a80622583f4e02b\",\n \"score\": \"0.6351566\",\n \"text\": \"public function store(Request $request)\\n {\\n $requestData = $request->all();\\n unset($requestData[\\\"_token\\\"]);\\n $requestData = json_encode($requestData);\\n ResourcesService::postToResourcesTable($requestData);\\n SyncService::SyncResourcesTable();\\n return redirect('admin/resources')->with('flash_message', 'Resource added!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.63417834\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":584,"cells":{"query_id":{"kind":"string","value":"e0ac26c1d4e411984c136bbeec77f2a9"},"query":{"kind":"string","value":"Validates an expression, populating a ValidationContext with any violations"},"positive_passages":{"kind":"list like","value":[{"docid":"5338dc28e3158c3d581bbca0caa7627a","score":"0.44939625","text":"public function validate(ActNodeInterface $actNode, EnvironmentNode $environmentNode);","title":""}],"string":"[\n {\n \"docid\": \"5338dc28e3158c3d581bbca0caa7627a\",\n \"score\": \"0.44939625\",\n \"text\": \"public function validate(ActNodeInterface $actNode, EnvironmentNode $environmentNode);\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"87eda06add3bd1d0cda804c82bc22c64","score":"0.61451733","text":"public function validateExpression(\n ExpressionNodeInterface $expressionNode,\n ValidationContextInterface $validationContext,\n $contextDescription\n );","title":""},{"docid":"2c8f1a35578ca67d71e81f12140f11b3","score":"0.58788514","text":"public function validate()\n {\n \n if((($this->value === null || strlen($this->value) === 0) && $this->required) || \n !preg_match_all($this->expVal, $this->value))\n {\n throw $this->getError();\n }\n }","title":""},{"docid":"d3a2ebb3352c5a0e202caaad61359c95","score":"0.57087344","text":"public static function isValid($expression)\n {\n return true;\n }","title":""},{"docid":"bca4326bf07827f3741a527f4cf7d8b7","score":"0.55561876","text":"public function parse()\n {\n // values are the final value that proceeds an operator like eq followed by a bracket\n // first let's make a flag to show if we are in the value scope or an operator has just occurred\n\n $current_indentation = 0;\n $previous_context = null;\n\n $base_expression = new Expression();\n $current_expression = $base_expression;\n\n while ($token = $this->_tokens->peek()) {\n // check the context\n try {\n $context = $this->getContext($token['type'], $previous_context, $token['value']);\n } catch (ValidationException $e){\n throw new ValidationException(\"Parse error. Invalid input around '{$token['value']}'\");\n }\n\n $current_expression = $this->applyContextToExp($current_expression, $context, $previous_context, $token['value']);\n $current_indentation = $this->getIndentation($current_indentation, $context);\n $previous_context = $context;\n }\n\n if(isset($context) && $context != self::CLOSE_BRACKET){\n throw new ParseException(\"Malformed input, error near '\" . $token['value'] . \"'\");\n }\n if ($current_indentation != 0) {\n throw new ParseException(\"Incorrect indentation\");\n }\n\n return $base_expression;\n }","title":""},{"docid":"48f4b34c548a3c471d5582382e5e13a6","score":"0.5256112","text":"private function getValidationExpression() : string\n {\n $regexp = '[+\\-]?\\d+';\n\n if ($this->precision > 0) {\n $regexp .= sprintf('(\\.\\d{1,%d})?', $this->precision);\n }\n\n return '~^' . $regexp . '$~';\n }","title":""},{"docid":"1968b6e45d0e5c18a694f91f69aa7f78","score":"0.525053","text":"public function checkExpr(Context\\Context $context, bool $noErrors):Type\\Type {\n }","title":""},{"docid":"1968b6e45d0e5c18a694f91f69aa7f78","score":"0.525053","text":"public function checkExpr(Context\\Context $context, bool $noErrors):Type\\Type {\n }","title":""},{"docid":"1968b6e45d0e5c18a694f91f69aa7f78","score":"0.525053","text":"public function checkExpr(Context\\Context $context, bool $noErrors):Type\\Type {\n }","title":""},{"docid":"1968b6e45d0e5c18a694f91f69aa7f78","score":"0.525053","text":"public function checkExpr(Context\\Context $context, bool $noErrors):Type\\Type {\n }","title":""},{"docid":"f6baf13ed943c7476eff16554b84a655","score":"0.51559705","text":"public function validate()\n {\n if ($this->isInvalid()) {\n throw new ValidationException($this->getValidator());\n }\n }","title":""},{"docid":"28a0f80d4c958a9ec0f37b67731d12c6","score":"0.5147825","text":"public static function Expression($expression);","title":""},{"docid":"05f50334bcebaba5bfd5cff959380f63","score":"0.51378846","text":"public function validate(ValidationContextInterface $validationContext);","title":""},{"docid":"45a6c5f581b6325090dbe51366e6288e","score":"0.51133406","text":"public function expression($expr){ }","title":""},{"docid":"c5e9a41de7d2e72c52e8ebbc9afaef7b","score":"0.50917304","text":"public function validate()\n {\n Validator::validate($this->parameters(), $this->rules());\n }","title":""},{"docid":"291c37ef04e6c4db5d86f974004b68ca","score":"0.5032182","text":"public function isValid($value, $context);","title":""},{"docid":"1a9a6dc10f324044cb6f5545050423e8","score":"0.5030331","text":"protected function getValidator_ExpressionService()\n {\n return $this->services['validator.expression'] = new \\Symfony\\Component\\Validator\\Constraints\\ExpressionValidator();\n }","title":""},{"docid":"afd041ac03d51a3b985c4c672ef7c3d3","score":"0.49996603","text":"private function validate()\n {\n if ($this->hasValidated) {\n return;\n }\n\n $this->checkDepth();\n\n foreach ($this->schema as $rule => $parameter) {\n $errors = $this->validateRule($rule, $parameter);\n $this->mergeErrors($errors);\n }\n\n $this->hasValidated = true;\n }","title":""},{"docid":"ea1e8fb0c30d18727883204db8d607a2","score":"0.49909204","text":"public static function validate() {}","title":""},{"docid":"840f766612b879ace84293d1c6536874","score":"0.49778163","text":"public function validate() {\n\t\t\n\t\t$data = $this->getData();\n\t\t\n\t\tif(!isset($data['title']) || empty($data['title'])) {\n\t\t\tGregory::get()->addError('Vous devez entrer un titre');\n\t\t}\n\t\t\n\t\tif(!isset($data['date']) || empty($data['date'])) {\n\t\t\tGregory::get()->addError('Vous devez entrer une date');\n\t\t}\n\t\t\n\t\tif(isset($data['date']) && !preg_match('/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/',$data['date'])) {\n\t\t\tGregory::get()->addError('Vous devez entrer une date au format AAAA-MM-JJ');\n\t\t}\n\t\t\n\t\tif(Gregory::get()->hasErrors()) throw new Exception('Votre formulaire contient des erreurs');\n\t\t\n\t}","title":""},{"docid":"94865d3003344ad6f12d7e59e21d19b7","score":"0.49713233","text":"private function validate()\n {\n $this->validationErrors = [];\n foreach ($this->validationRules as $attr => $rules) {\n foreach ($rules as $rule) {\n $passed = true;\n if ($rule['rule'] == 'required') {\n $passed = $this->hasValue($attr);\n } elseif ($this->hasValue($attr)) {\n $passed = $this->validateRule($rule, $attr);\n }\n if (!$passed) {\n $this->validationErrors[$attr] = $rule['message'];\n }\n }\n }\n }","title":""},{"docid":"155e209f37f5425f2442ae1a826f7994","score":"0.4964799","text":"public function validate() {\n\t\t// process modifier\n\t\t\tif($this->value !== NULL) {\n\t\t\t\tforeach($this->modifier as $modifier) {\n\t\t\t\t\t$this->value = call_user_func($this->form->modifier[$modifier], $this->value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t// check validator\n\t\t\tforeach($this->validator as $validator => $calls) {\n\t\t\t\tforeach($calls as $arguments) {\n\t\t\t\t\tarray_unshift($arguments, $this->value);\n\n\t\t\t\t\tif(call_user_func_array($this->form->validator[$validator], $arguments) !== true) {\n\t\t\t\t\t\tif(!isset($this->errors)) {\n\t\t\t\t\t\t\t$this->errors = array();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->errors[] = $validator;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// set validation status\n\t\t\tif($this->errors !== NULL) {\n\t\t\t\t$this->valid = false;\n\t\t\t} else {\n\t\t\t\t$this->valid = true;\n\t\t\t}\n\t}","title":""},{"docid":"698ec122b37c60c63f635b842cfe0da2","score":"0.49389753","text":"public function validate()\n {\n if ($this->amount == 0) {\n $this->errors[] = 'Amount is required';\n } else if ($this->amount < 0) {\n $this->errors[] = 'Amount cannot be less than 0';\n } else if ( $this->amount > 999999.99) {\n $this->errors[] = 'Amount cannot be greater than 999 999.99';\n }\n \n //$today = date('Y-m-d');\n $today = date_create(date('Y-m-d'));\n \n $todayPlusOneMonth = date_add($today, date_interval_create_from_date_string(\"1 month\"));\n \n $todayPlusOneMonth = date_format($todayPlusOneMonth, 'Y-m-d');\n \n if($today == false) {\n \n $this->errors[] = \"Some problems with calculating one month from today's date in Expenses validate function\";\n }\n\n if ($this->date_of_expense < \"2000-01-01\" || $this->date_of_expense == 0 || $this->date_of_expense > $todayPlusOneMonth) {\n $this->errors[] = 'Select correct date'; \n }\n\n if (!isset($this->payment_method)) {\n $this->errors[] = 'Payment method is required';\n } else if ($this->payment_method == '0') {\n $this->errors[] = 'Payment method is required';\n }\n \n if (!isset($this->expense_category)) {\n $this->errors[] = 'Category is required';\n } else if ($this->expense_category == '0') {\n $this->errors[] = 'Category is required';\n }\n \n if(strlen($this->expense_comment) > 100){\n $this->errors[] = 'Comment cannot be longer than 100 chars';\n } \n }","title":""},{"docid":"3ce49a2323d7c19ecdec9ecc22d1182a","score":"0.49351776","text":"abstract protected function validation();","title":""},{"docid":"b82aa84ac9b3fccf4d3feb77e2c57462","score":"0.4913208","text":"function Validify() {\r\n\r\n\t}","title":""},{"docid":"888f3855e9d566b60914a40e73fabe49","score":"0.4901926","text":"function wpv_evaluate_expression($expression){\n //Replace AND, OR, ==\n $expression = strtoupper($expression);\n $expression = str_replace(\"AND\", \"&&\", $expression);\n $expression = str_replace(\"OR\", \"||\", $expression);\n $expression = str_replace(\"NOT\", \"!\", $expression);\n $expression = str_replace(\"=\", \"==\", $expression);\n $expression = str_replace(\"!==\", \"!=\", $expression); // due to the line above\n \n // validate against allowed input characters\n\t$count = preg_match('/[0-9+-\\=\\*\\/<>&\\!\\|\\s\\(\\)]+/', $expression, $matches);\n\t\n\t// find out if there is full match for the entire expression\t\n\tif($count > 0) {\n\t\tif(strlen($matches[0]) == strlen($expression)) {\n\t\t\t \t$valid_eval = wpv_eval_check_syntax(\"return $expression;\");\n\t\t\t \tif($valid_eval) {\n\t\t\t \t\treturn eval(\"return $expression;\");\n\t\t\t \t}\n\t\t\t \telse {\n\t\t\t \t\treturn __(\"Error while parsing the evaluate expression\", 'wpv-views');\n\t\t\t \t}\n\t\t}\n\t\telse {\n\t\t\treturn __(\"Conditional expression includes illegal characters\", 'wpv-views');\n\t\t}\n\t}\n\telse {\n\t\treturn __(\"Correct conditional expression has not been found\", 'wpv-views');\n\t}\n\t\n}","title":""},{"docid":"0dce500ef819de0fb6485383ad2ad7c4","score":"0.48998713","text":"public function createRuleFailedValidation(MessageBag $errors);","title":""},{"docid":"fc0d59b884f3e98dd3d52e722132375e","score":"0.48953006","text":"public function validate()\n {\n if (!$this->date) {\n throw new DomainException('Mandatory field date');\n }\n if (count($this->transactions) == 0) {\n throw new DomainException('No transactions for verification id \"' . $this->id . '\".');\n }\n\n // validate verifications\n $sum = 0;\n foreach ($this->transactions as $transaction) {\n // validate all our transactions\n $transaction->validate();\n // calculate sum of all transactions\n $sum += $transaction->getAmount();\n }\n\n // validate that our transactions equal zero\n //FIXME The round() is due to precision loss in float operation. Maybe use Money\\Money here instead\n if (round($sum,2) != 0) {\n throw new DomainException('The verification id \"' . $this->id . '\" have a non-zero sum: ' . $sum);\n }\n }","title":""},{"docid":"4fc605c2b5a31f26fd5177634c1aac17","score":"0.48666382","text":"public abstract function validate();","title":""},{"docid":"c0e8e300f30474503b4e497871ad269b","score":"0.48468596","text":"public function validate() {\n foreach ($this->_rules as $rule) {\n $this->_testRule($rule);\n }\n }","title":""},{"docid":"2251e2d0d3b49223874f72500098fb4d","score":"0.48428264","text":"public function evaluate($expression, Context $context) {\n\t\t$parser = new EelParser($expression, $context);\n\t\t$res = $parser->match_Expression();\n\t\tif (!array_key_exists('val', $res)) {\n\t\t\tthrow new \\Exception('No value in result: ' . json_encode($res));\n\t\t} else if ($res['val'] instanceof Context) {\n\t\t\treturn $res['val']->unwrap();\n\t\t} else {\n\t\t\treturn $res['val'];\n\t\t}\n\t}","title":""},{"docid":"9d819d4f0ce499808104a255f71884f8","score":"0.48385385","text":"public function validate() {\n\n $validationErrors = [];\n\n // Check for duplication of email address across parent accounts\n $matchingUsers = self::values(\"COUNT(*)\", \"WHERE emailAddress = ? AND parent_account_id = ? AND id <> ?\", $this->emailAddress,\n $this->parentAccountId ? $this->parentAccountId : 0, $this->id ? $this->id : -1);\n\n\n if ($matchingUsers[0] > 0)\n $validationErrors[\"emailAddress\"] = new FieldValidationError(\"emailAddress\", \"duplicateEmail\", \"A user already exists with this email address\");\n\n\n // Check for previously used password if new one supplied\n if ($this->getId()) {\n $passwordChange = self::values(\"COUNT(*)\", \"WHERE id = ? AND hashedPassword <> ?\",\n $this->getId(), $this->hashedPassword);\n\n if ($passwordChange[0] > 0) {\n $previousPassword = UserPasswordHistory::values(\"COUNT(*)\", \"WHERE user_id = ? AND hashed_password = ?\", $this->getId(), $this->hashedPassword);\n if ($previousPassword[0] > 0)\n $validationErrors[\"hashedPassword\"] = new FieldValidationError(\"hashedPassword\", \"previousPassword\", \"The supplied password has been used before\");\n }\n }\n\n return $validationErrors;\n }","title":""},{"docid":"352a2d88a0fd786c0c7acf0c6ae20634","score":"0.48317906","text":"protected function validate() {\n foreach ($this->getFields() as $field) {\n $this->errors = array_merge($this->errors, $field->validate());\n }\n\n if ($this->isView() && !(method_exists($this, 'getViewSetup') and is_string($this->getViewSetup()))) {\n $this->_addError('%s - invalid view definition');\n }\n\n if (count($this->errors) > 0) {\n throw new Exception(implode(\"; \", $this->errors));\n }\n }","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0efd62aa7717cff7c82f3995b5fb18ae","score":"0.4829237","text":"abstract public function validate();","title":""},{"docid":"0ef6d0981c283635aa31bf72c1695d4f","score":"0.48105127","text":"public function validate()\n\t{\n\t\t$errors = new Validation\\Message\\Group();\n\n\t\tforeach ($this->fields as $field) {\n\t\t\t$errors->appendMessages($field->validate());\n\t\t}\n\n\t\tif ($errors->count() !== 0) {\n\t\t\tthrow new ValidationException($errors);\n\t\t}\n\t}","title":""},{"docid":"83e9c752d0d320480a7ca703494fd357","score":"0.48058197","text":"public function validate($value);","title":""},{"docid":"b9eb03dae0464ef80ef1342fa9ca15fc","score":"0.48049557","text":"public function validate();","title":""},{"docid":"b9eb03dae0464ef80ef1342fa9ca15fc","score":"0.48049557","text":"public function validate();","title":""},{"docid":"b9eb03dae0464ef80ef1342fa9ca15fc","score":"0.48049557","text":"public function validate();","title":""},{"docid":"fd89045eeb1e462b325b4f08af1b136d","score":"0.4776656","text":"public function validateExpression($input) {\n\t\t$status = false;\n\n\t\tif($input === '') {\n\t\t// Blank expressions are valid\n\t\t\treturn true;\n\t\t}\n\n\t\tif(strpos($input, '®ex') !== false) {\n\t\t// TODO: Still validate the rest of the expression\n\t\t\treturn true;\n\t\t}\n\n\t\t$input = $this->sanitizeExpression($input);\n\n\t\t// Test for only valid characters\n\t\tif(preg_match('/^[-\\w\\.\\:\\(\\)\\&\\@\\,\\!\\#]+$/i', $input)) {\n\t\t\t$status = true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Unbalanced parens and parens without functions\n\t\t// or functions without parens\n\n\t\t$ampersands = substr_count($input, '&');\n\t\t$open_parens = substr_count($input, '(');\n\t\t$close_parens = substr_count($input, ')');\n\n\t\tif($open_parens === $close_parens) {\n\t\t\t$status = true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\tif($ampersands == $open_parens) {\n\t\t\t$status = true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Test for only valid function names\n\t\tif(strpos($input, '&') !== false) {\n\t\t\t$function_total = preg_match_all('/\\&[^\\(]*\\(/',\n\t\t\t\t$input, $functions);\n\t\t\tif($function_total == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tforeach($functions[0] as $function) {\n\t\t\t\tswitch($function) {\n\t\t\t\tcase '&diff(':\n\t\t\t\tcase '&intersect(':\n\t\t\t\tcase '®ex(':\n\t\t\t\tcase '®exp(':\n\t\t\t\tcase '&union(':\n\t\t\t\t\t$status = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Test for only valid meta character sequences\n\t\tif(preg_match_all('/[^-\\w\\.][^-\\w\\.]/',\n\t\t\t\t$input, $double_matches)) {\n\t\t\t\n\t\t\tforeach($double_matches[0] as $double) {\n\t\t\t\tswitch($double) {\n\t\t\t\tcase ',#':\n\t\t\t\tcase ',!':\n\t\t\t\tcase ',&':\n\t\t\t\tcase ',@':\n\t\t\t\tcase '!&':\n\t\t\t\tcase '!@':\n\t\t\t\tcase '#!':\n\t\t\t\tcase '#&':\n\t\t\t\tcase '#@':\n\t\t\t\tcase '(#':\n\t\t\t\tcase '(!':\n\t\t\t\tcase '(&':\n\t\t\t\tcase '(@':\n\t\t\t\tcase '),':\n\t\t\t\tcase '))':\n\t\t\t\t\t$status = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}","title":""},{"docid":"da847743c09392dfb89d47e3f4e16577","score":"0.47619358","text":"protected function _getXpathValidationExpression()\n {\n return $this->_validator->getXpathValidationExpression();\n }","title":""},{"docid":"9a807529cfe2ddfedf179ace5082fb77","score":"0.47436598","text":"public function testValidateExpression()\n\t{\n\t\t// From a a place to a transition.\n\t\t// Create a place.\n\t\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\n\t\t$place = new PNPlace($colorSet);\n\t\tTestReflection::setValue($this->object, 'input', $place);\n\n\t\t// Create a transition.\n\t\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\n\t\t$transition = new PNTransition($colorSet);\n\t\tTestReflection::setValue($this->object, 'output', $transition);\n\n\t\t// Mock the expression.\n\t\t$expression1 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\n\t\t$expression1->expects($this->once())\n\t\t\t->method('execute')\n\t\t\t->will($this->returnValue(array(8, 8.2, array())));\n\n\t\tTestReflection::setValue($this->object, 'expression', $expression1);\n\n\t\t$this->assertTrue($this->object->validateExpression());\n\n\t\t// Test a sub-set of the transition color set.\n\t\t$expression2 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\n\t\t$expression2->expects($this->once())\n\t\t\t->method('execute')\n\t\t\t->will($this->returnValue(array(8, 8.2)));\n\n\t\tTestReflection::setValue($this->object, 'expression', $expression2);\n\n\t\t$this->assertTrue($this->object->validateExpression());\n\n\t\t// Test with non matching transition color set return values types.\n\t\t$expression3 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\n\t\t$expression3->expects($this->once())\n\t\t\t->method('execute')\n\t\t\t->will($this->returnValue(array('test')));\n\n\t\tTestReflection::setValue($this->object, 'expression', $expression3);\n\n\t\t$this->assertFalse($this->object->validateExpression());\n\n\t\t// Test with non matching expression arguments.\n\t\t$expression4 = $this->getMockForAbstractClass('PNArcExpression', array(array('double', 'double', 'array')));\n\t\tTestReflection::setValue($this->object, 'expression', $expression4);\n\t\t$this->assertFalse($this->object->validateExpression());\n\n\t\t// From a transition to a place.\n\t\t// Create a transition.\n\t\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\n\t\t$transition = new PNTransition($colorSet);\n\t\tTestReflection::setValue($this->object, 'input', $transition);\n\n\t\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\n\t\t$place = new PNPlace($colorSet);\n\t\tTestReflection::setValue($this->object, 'output', $place);\n\n\t\t// Mock the expression.\n\t\t$expression1 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\n\t\t$expression1->expects($this->once())\n\t\t\t->method('execute')\n\t\t\t->will($this->returnValue(array(8, 8.2, array())));\n\n\t\tTestReflection::setValue($this->object, 'expression', $expression1);\n\n\t\t$this->assertTrue($this->object->validateExpression());\n\t}","title":""},{"docid":"8c996e92768fb3fe5ee49749eaf75c78","score":"0.47428024","text":"public function doValidate($value);","title":""},{"docid":"a6502af97c941cd5e819e18ef2c03128","score":"0.4738034","text":"public function validate() {\n $this->validator->run();\n }","title":""},{"docid":"2c1ec25e3ce86e19f9a9893ba2c0ac5f","score":"0.47365502","text":"abstract public function validate($value);","title":""},{"docid":"6645b4ad2c621338ba143ac3452bf3eb","score":"0.47327518","text":"public function setExpression($var)\n {\n GPBUtil::checkString($var, True);\n $this->expression = $var;\n\n return $this;\n }","title":""},{"docid":"c2065f3683d2587baff4aae2e510d531","score":"0.47266635","text":"final protected function validate(): void\n {\n if ($this->errors !== []) {\n // already validated\n return;\n }\n\n $this->errors = [];\n\n foreach ($this->rules as $field => $rules) {\n $hasValue = $this->hasValue($field);\n $value = $this->getValue($field);\n\n foreach ($this->provider->getRules($rules) as $rule) {\n if (!$hasValue && $rule->ignoreEmpty($value) && !$rule->hasConditions()) {\n continue;\n }\n\n foreach ($rule->getConditions() as $condition) {\n if (!$condition->isMet($this, $field, $value)) {\n // condition is not met, skipping validation\n continue 2;\n }\n }\n\n if (!$rule->validate($this, $field, $value)) {\n // got error, jump to next field\n $this->errors[$field] = $rule->getMessage($field, $value);\n break;\n }\n }\n }\n }","title":""},{"docid":"10c0fe53e195fb3ae4304022a860fc28","score":"0.47261187","text":"function validation() {\n }","title":""},{"docid":"5299af517ce4082b779d25fdd1daf8d4","score":"0.47245687","text":"abstract protected function validate();","title":""},{"docid":"5299af517ce4082b779d25fdd1daf8d4","score":"0.47245687","text":"abstract protected function validate();","title":""},{"docid":"ce2ae065144b381a90172259412984b1","score":"0.47060218","text":"private function validate() {\n $validator = new ProcessValidator($this->getData(), $this->validation);\n if ($validator->fails()) {\n throw new ProcessException($validator->getErrors(\"\\n\"));\n }\n }","title":""},{"docid":"9691c2d4d30b5db668063aeef4cc5586","score":"0.46794862","text":"public function validate()\r\n {\r\n if (empty($this->value)) {\r\n if ($this->isRequired()) {\r\n $this->addError(\"Please complete this field\");\r\n } else {\r\n return;\r\n }\r\n }\r\n\r\n if (is_string($this->value)) {\r\n $min = $this->getMetadata('@length', 'min');\r\n $max = $this->getMetadata('@length', 'max');\r\n\r\n if ($min !== null && strlen($this->value) < $min) {\r\n $this->addError(\"Minimum length is {$min} characters\");\r\n } else {\r\n if ($max !== null && strlen($this->value) > $max) {\r\n $this->addError(\"Maximum length is {$max} characters\");\r\n }\r\n }\r\n }\r\n\r\n if (is_int($this->value)) {\r\n $min = $this->getMetadata('@range', 'min');\r\n $max = $this->getMetadata('@range', 'max');\r\n\r\n if (($min !== null && $this->value < $min) || ($max !== null && $this->value > $max)) {\r\n $this->addError(\"Please enter a value in the range {$min} to {$max}\");\r\n }\r\n }\r\n }","title":""},{"docid":"e969574e8c252585109e83c2adab43db","score":"0.46722168","text":"protected function _validate()\n\t{\n\t\t$this->_validate = Validate::factory($this->_values);\n\t\t\n\t\t// Trim all fields\n\t\t$this->_validate->filter(TRUE, 'trim');\n\t\t\n\t\t$fields = array_keys($this->_values);\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\tif ( ! empty($this->_rules[$field]))\n\t\t\t{\n\t\t\t\t$this->_validate->rules($field, $this->_rules[$field]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set rules for required fields.\n\t\tforeach ($this->_required_fields[$this->_type] as $required_field)\n\t\t{\n\t\t\t// Must have a value.\n\t\t\t$this->_validate->rule($required_field, 'not_empty');\n\t\t\t\n\t\t\t// Make sure the other rules for this required field have been added.\n\t\t\tif ( ! in_array($required_field, $fields))\n\t\t\t{\n\t\t\t\t$this->_validate->rules($field, $this->_rules[$required_field]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// TODO: Require fields based on credit card or bank account option.\n\t\t\n\t\t// Placeholder for transaction errors\n\t\t$this->_validate->rule('transaction', TRUE);\n\t}","title":""},{"docid":"e87e1f0749cf79a1203cbc3645af662b","score":"0.46652707","text":"public function validate()\n {\n $this->prepareForValidation();\n\n $instance = $this->getValidatorInstance();\n $this->addCustomValidationRules($instance);\n\n if (! $this->passesAuthorization()) {\n $this->failedAuthorization();\n } elseif (! $instance->passes()) {\n $this->failedValidation($instance);\n }\n }","title":""},{"docid":"fc3d9e9d048318dfa295c08378a00126","score":"0.46521562","text":"public function validate() {\n\t\t$errors = $this->getErrors();\n\t\tif (count($errors) > 0) {\n\t\t\tforeach ($errors as $violation) {\n\t\t\t\t/* @var $violation Symfony\\Component\\Validator\\ConstraintViolation */\n\t\t\t\t$root = $violation->getRoot();\n\t\t\t\t$class = is_object($root) ? get_class($root) : $root;\n\t\t\t\t$msg = \"{$class}.{$violation->getPropertyPath()}: {$violation->getMessage()}\";\n\t\t\t\tthrow new ValidationException($msg);\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}","title":""},{"docid":"e8beddc00da48a823efc2a898a7ea4a7","score":"0.46506816","text":"function _setInputErrorToContext()\n\t{\n\t\tif($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_MESSAGE'] && !Context::get('XE_VALIDATOR_MESSAGE'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_MESSAGE', $_SESSION['XE_VALIDATOR_MESSAGE']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] && !Context::get('XE_VALIDATOR_MESSAGE_TYPE'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_MESSAGE_TYPE', $_SESSION['XE_VALIDATOR_MESSAGE_TYPE']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_RETURN_URL'] && !Context::get('XE_VALIDATOR_RETURN_URL'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_RETURN_URL', $_SESSION['XE_VALIDATOR_RETURN_URL']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_ID'] && !Context::get('XE_VALIDATOR_ID'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_ID', $_SESSION['XE_VALIDATOR_ID']);\n\t\t}\n\t\tif(count($_SESSION['INPUT_ERROR']))\n\t\t{\n\t\t\tContext::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']);\n\t\t}\n\n\t\t$this->_clearErrorSession();\n\t}","title":""},{"docid":"2ed1093e7612dc19edce0b2cbd5afb51","score":"0.4642975","text":"public function validateData(){\n $validator=Validator::make($this->request->all(), array_merge($this->expeditionRules(),$this->paymentRules()));\n if($validator->fails()){$this->status=false;}\n return $validator;\n }","title":""},{"docid":"1c1eb93adc25f43c62b6de46d66b14cc","score":"0.46360344","text":"private function build_validate_regexp($arr_texts, $arr_expr, &$arr_names, &$arr_types) {\r\n \t\t$ret = '';\r\n \t\t$c = count($arr_expr);\r\n \t\tfor($i = 0; $i < $c; $i++) {\r\n \t\t\t$ret .= preg_quote(array_shift($arr_texts));\r\n \t\t\t$expr = trim($arr_expr[$i], '{}');\r\n \t\t\t$name = '';\r\n \t\t\t$reg_ex = $this->build_expresssion_regexp($expr, $name, $type);\r\n \t\t\t$ret .= '(' . $reg_ex . ')';\r\n \t\t\t$arr_names[] = $name;\r\n \t\t\t$arr_types[] = $type;\r\n \t\t}\r\n \t\t$last = array_shift($arr_texts);\r\n \t\tswitch ($last) {\r\n \t\t\tcase '*':\r\n \t\t\tcase '%':\r\n \t\t\tcase '!':\r\n \t\t\t\tbreak; \t\t\t\t\r\n \t\t\tdefault:\r\n \t\t\t\t$ret .= preg_quote($last);\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\t$ret = '#^' . $ret . '$#';\r\n \t\treturn $ret;\r\n \t}","title":""},{"docid":"b24e2534e7116f997ffab763a568638e","score":"0.4624857","text":"public function valuesExp(string $expression, array $bind = []);","title":""},{"docid":"3c60a9346eb076a8718142fbbcfe46eb","score":"0.4622725","text":"public function validate($context = 'payload')\n {\n $args = func_get_args();\n array_shift($args);\n\n $this->each(function ($claim) use ($context, $args) {\n $str = Str::upper(Str::substr($context, 0, 1)) . Str::substr($context, 1);\n call_user_func_array(\n [$claim, 'validate' . $str],\n $args\n );\n });\n\n return $this;\n }","title":""},{"docid":"e5546cf8956512cd29284e38549f1c64","score":"0.4621007","text":"public function validate() {\r\n $pattern=\r\n \"/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+/\";\r\n if(!preg_match($pattern,$this->email)){\r\n $this->setError('Invalid email address');\r\n }\r\n if (strlen($this->email)>255){\r\n $this->setError('Address is too long');\r\n }\r\n }","title":""},{"docid":"d06c8d00aae136f722495ad3c8313378","score":"0.46033448","text":"public function setExpression($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Api\\Expr\\V1alpha1\\CheckedExpr::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }","title":""},{"docid":"6ac78ae3f35a89a87bbdd964106fc3e9","score":"0.4596402","text":"public function validates(array $validation_rules = array(), array $validation_messages = array());","title":""},{"docid":"8a998586a44bc6fd29657ccc03bf8a6a","score":"0.459481","text":"public function validate()\n\t{\n\t\t$rules = $this->rules();\n\n\t\tforeach($rules as $rule) {\n\t\t\t//shift field names that specified in rule so in array remains only rule\n\t\t\t$subs = array_shift($rule);\n\t\t\tforeach ($subs as $sub) {\n\t\t\t\t//search text by name of the field and call method by key of the rule\n\t\t\t\t//so in rule 'length' => 20 we will search in $methods array a handler with key 'length'\n\t\t\t\t$text = $this->$sub;\n\t\t\t\t$method = $this->methods[key($rule)];\n\t\t\t\t$this->$method($sub, $text, $rule);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->hasErrors();\n\t}","title":""},{"docid":"167a5362a89efa3b5f40ab993e5ce7ef","score":"0.4586087","text":"public function getEvaluationCriteria() {\n return $this->getEvalAttribute('validation');\n }","title":""},{"docid":"539a73002a975d59eeaaf5df14b3cdf3","score":"0.4577151","text":"function validarExpresion($variable, $expresion){\n\t\t\t$validar = array(\n\t\t\t\t\t \"options\" => array(\"regexp\"=>$expresion)\n\t\t\t\t);\n\t\t\tif(!filter_var($variable, FILTER_VALIDATE_REGEXP, $validar)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}","title":""},{"docid":"0cc728d8279f5068c6f4654a31030b44","score":"0.4574859","text":"public function check(){\n\t\t\t$this->prepareValues();\n\t\t\t$alerts = new Alerts();\n\t\t\t$validate = function($field, $value, $asserts) use($alerts){\n\t\t\t\t$validators = $custom = array();\n\t\t\t\tforeach($asserts as $assertName => $assertProperties){\n\t\t\t\t\t$className = 'Symfony\\Component\\Validator\\Constraints\\\\'.$assertName;\n\t\t\t\t\tif (class_exists($className)){\n\t\t\t\t\t\t$validators[] = new $className($assertProperties);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$custom[$assertName] = $assertProperties;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$fieldAlerts = $this->app['validator']->validateValue(array($field => $value), new Asserts(array($field => $validators)));\n\t\t\t\tforeach($fieldAlerts as $alert){\n\t\t\t\t\t$alerts->add(new Alert($alert->getMessage(), null, array(), null, trim($alert->getPropertyPath(), '[]'), $alert->getInvalidValue()));\n\t\t\t\t}\n\t\t\t\tif (count($custom)){\n\t\t\t\t\tforeach($custom as $assertName => $assertProperties){\n\t\t\t\t\t\t$explan = new Explan();\n\t\t\t\t\t\t$expression = $explan->evaluate($assertProperties['expression'], array(\n\t\t\t\t\t\t\t'this'\t=> $this,\n\t\t\t\t\t\t\t'value'\t=> $value\n\t\t\t\t\t\t));\n\t\t\t\t\t\tif(!$expression){\n\t\t\t\t\t\t\t$alerts->add(new Alert($assertProperties['message'], null, array(), null, $field, $value));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// TODO: DRY!\n\t\t\tforeach($this->getScheme()->get('fields')->get() as $field => $properties){\n\t\t\t\tif (isset($properties['validation']) && is_array($properties['validation'])){\n\t\t\t\t\tif (@$properties['multiple']){\n\t\t\t\t\t\tif (in_array($properties['type'], array('file', 'image'))){\n\t\t\t\t\t\t\tif (is_null($this->get($field)) || get_class($this->get($field)) != 'app\\models\\helper\\iterator'){\n\t\t\t\t\t\t\t\t$value = null;\n\t\t\t\t\t\t\t\t$id = null;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tforeach($this->get($field) as $id => $item){\n\t\t\t\t\t\t\t\t\t$item = (new helper\\proto())->set($item);\n\t\t\t\t\t\t\t\t\tif (!file_exists($this->app['config']->get('paths')->get('root').$item->get('route'))){\n\t\t\t\t\t\t\t\t\t\t$value = null;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$value = new File($this->app['config']->get('paths')->get('root').$item->get('route'));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$validate($field.'.'.$id, $value, $properties['validation']);\n\t\t\t\t\t\t} else {\n $fieldData = $this->get($field);\n if ($fieldData && ($fieldData instanceof helper\\proto) && $fieldData->get()) {\n foreach($fieldData->get() as $id => $item){\n $validate($field.'.'.$id, $item, $properties['validation']);\n }\n } else {\n \t$validate($field, $this->get($field), $properties['validation']);\n }\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (in_array($properties['type'], array('file', 'image'))){\n\t\t\t\t\t\t\tif (is_null($this->get($field)) || get_class($this->get($field)) != 'app\\models\\helper\\iterator' || !file_exists($this->app['config']->get('paths')->get('root').$this->get($field)->getFirst()->get('route'))){\n\t\t\t\t\t\t\t\t$value = null;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$value = new File($this->app['config']->get('paths')->get('root').$this->get($field)->getFirst()->get('route'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$value = $this->get($field);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$validate($field, $value, $properties['validation']);\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\n return ($alerts->count() > 0 ? $alerts : true);\n\t\t}","title":""},{"docid":"8648d5b3fdc20334e017380ca0a1be7c","score":"0.4567749","text":"public function validate()\n\t{\n\t\treturn helper('validator')->validate_all($this->_attributes, $this->rules);\n\t\t\n\t}","title":""},{"docid":"4a7439ae497794d507de99d9ef08eec3","score":"0.45644754","text":"public function validate()\r\n\t{\r\n\t\tforeach ($this->reglas as $nombreCampo => $reglasCampo) {\r\n\t\t\t$this->applyRules($nombreCampo, $reglasCampo);\r\n\t\t}\r\n\t}","title":""},{"docid":"f9c3da05d4b055288ef2116390fcce65","score":"0.45595163","text":"abstract protected function createExpression();","title":""},{"docid":"7cf05683331b1f753dd154c525ade332","score":"0.45581523","text":"public function validate($what);","title":""},{"docid":"a9458fa68e32d5c3b4ba80e76b4da5b5","score":"0.45576084","text":"public function validate()\n {\n // TODO - Develop this\n }","title":""},{"docid":"328140188ec5b30cf3d964f778aeb47f","score":"0.45518434","text":"public static function employeeValidation($data)\n {\n $rules = array(\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'company_id' => 'required'\n );\n\n $messages = array(\n\t \t'first_name.required' => 'Insert first name',\n\t \t'last_name.required' => 'Insert last name',\n\t \t'company_id.required' => 'Select a company'\n );\n \n return Validator::make($data, $rules, $messages);\n }","title":""},{"docid":"c2de6d060f3789bb6e3d57cd1920a336","score":"0.45502308","text":"public function setExpr($expression) {\n\t\t$this->valueList = func_get_args();\n\t\t$this->expression = array_shift($this->valueList);\n\t\treturn $this;\n\t}","title":""},{"docid":"473535e63f10b8ebe1f3431743512964","score":"0.45471865","text":"public function setExpression($expression) {\n $this->expression = $expression;\n return $this;\n }","title":""},{"docid":"bc323b3e70e9f1a13f4f5845a9f3f937","score":"0.45292997","text":"public function addFieldValidationRule(array $configuration);","title":""},{"docid":"65e8b8990858356a03056bc8a0579bd4","score":"0.45040745","text":"public static function clean($expression)\n {\n return Util::unwrap(\n Util::toString($expression, true)\n );\n }","title":""},{"docid":"b6d54ebaa330f16f1862a13961a2daa2","score":"0.4499778","text":"public function validate(): void;","title":""},{"docid":"b6d54ebaa330f16f1862a13961a2daa2","score":"0.4499778","text":"public function validate(): void;","title":""},{"docid":"07b894fa3538d15be53281ff30760c46","score":"0.44897607","text":"public function validate()\n {\n\n $this->rules();\n $this->filters();\n\n //aplicar todos los filtros\n foreach ($this->_formFilters as $filterToApply) {\n\n $attributeToEval = $filterToApply['attribute'];\n\n if (!property_exists($this,$attributeToEval)) {\n\n throw new Exception(\"El atributo {$attributeToEval} no existe\");\n }\n\n $methodTobeUsed = \"filter\" . ucfirst($filterToApply['filter']);\n\n if (!method_exists($this, $methodTobeUsed)) {\n\n throw new Exception(\"El método {$methodTobeUsed} no existe, no se puede filtrar\n el atributo {$attributeToEval}\");\n }\n\n $this->{$methodTobeUsed}($attributeToEval);\n\n }\n\n //validar todas las reglas\n foreach ($this->_formRules as $ruleToEval) {\n\n $attributeToEval = $ruleToEval['attribute'];\n\n if (!property_exists($this,$attributeToEval)) {\n\n throw new Exception(\"El atributo {$attributeToEval} no existe\");\n }\n\n $methodTobeUsed = \"rule\" . ucfirst($ruleToEval['rule']);\n\n if (!method_exists($this, $methodTobeUsed)) {\n\n throw new Exception(\"El método {$methodTobeUsed} no existe, no se puede validar\n el atributo {$attributeToEval}\");\n }\n\n $this->{$methodTobeUsed}($attributeToEval);\n\n }\n\n\n //si el atributo _formErrors tiene valores, entonces el formulario no es valido.\n if(count($this->_formErrors) > 0 ){\n\n return false;\n }\n\n return true;\n }","title":""},{"docid":"208997cddb8e3a527f7744935a34d837","score":"0.4488532","text":"public function processValidated()\n {\n }","title":""},{"docid":"208997cddb8e3a527f7744935a34d837","score":"0.4488532","text":"public function processValidated()\n {\n }","title":""},{"docid":"ba8fbe89c1f0eba45c33b2be4450350a","score":"0.44876486","text":"public function validation()\n {\n $validator = new Validation();\n\n $validator->add(\n 'email',\n new EmailValidator(\n [\n 'model' => $this,\n 'message' => 'Please enter a correct email address',\n ]\n )\n );\n\n return $this->validate($validator);\n }","title":""},{"docid":"ba8fbe89c1f0eba45c33b2be4450350a","score":"0.44876486","text":"public function validation()\n {\n $validator = new Validation();\n\n $validator->add(\n 'email',\n new EmailValidator(\n [\n 'model' => $this,\n 'message' => 'Please enter a correct email address',\n ]\n )\n );\n\n return $this->validate($validator);\n }","title":""},{"docid":"ba8fbe89c1f0eba45c33b2be4450350a","score":"0.44876486","text":"public function validation()\n {\n $validator = new Validation();\n\n $validator->add(\n 'email',\n new EmailValidator(\n [\n 'model' => $this,\n 'message' => 'Please enter a correct email address',\n ]\n )\n );\n\n return $this->validate($validator);\n }","title":""},{"docid":"08ffab953088f894523bf8d5843fbe0b","score":"0.44860488","text":"public function addValidationError()\n {\n $this->_validationError = true;\n }","title":""},{"docid":"444ac68cab69ead3dc9112a05827b284","score":"0.44666982","text":"public function validate(\\Closure $closure): bool;","title":""},{"docid":"70d9ed40b5f367b58724a1f0e4d148c9","score":"0.44660297","text":"public function Process() {\n\t\t\n\t\tforeach($this->_rules as $i) {\n\t\t\t$rule = $i[0];\n\t\t\t$param = $i[1];\n\t\t\t$methodName = '_is'.ucfirst($rule);\n\t\t\t$method = new ReflectionMethod('validator', $methodName);\n\t\t\t\n\t\t\tif(sizeof($method->getParameters()) > 1) {\n\t\t\t\t$result = $this->$methodName($this->_variable, $param);\n\t\t\t} else {\n\t\t\t\t$result = $this->$methodName($this->_variable);\n\t\t\t}\n\t\t\t\n\t\t\tif($result === false) {\n\t\t\t\t$this->_exceptions[] = new validatorexception($this->_variable, $rule, $param);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(sizeof($this->_exceptions)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}","title":""},{"docid":"6fd78730aebd311b7bb782182be25328","score":"0.4457546","text":"public function rules()\n {\n return [\n 'amount' => 'required|numeric|min:0|digits_between:0,11',\n 'exp_month' => 'required|integer|min:0|max:12',\n 'exp_year' => 'required|integer|digits:2',\n 'cvv' => 'required|integer|digits:3'\n ];\n }","title":""},{"docid":"1a58537eb58d2f38f53e2f5217a4e96d","score":"0.44559518","text":"public function validate() {\n }","title":""},{"docid":"3f522e021b6cdb3c4b084efa69a669f7","score":"0.445085","text":"public static function validate( HppRequest $hppRequest ) {\n\t\tself::Initialise();\n\n\t\t$violations = self::$validator->validate( $hppRequest );\n\n\t\tif ( $violations->count() > 0 ) {\n\t\t\t$validationMessages = array();\n\n\t\t\tforeach ( $violations as $violation ) {\n\n\t\t\t\t/* @var ConstraintViolationInterface $violation */\n\t\t\t\t$validationMessages[] = $violation->getMessage();\n\t\t\t}\n\n\t\t\t$message = \"HppRequest failed validation with the following errors:\";\n\t\t\tforeach ( $validationMessages as $validationMessage ) {\n\t\t\t\t$message .= $validationMessage . '.';\n\t\t\t}\n\n\t\t\tself::$logger->info( $message );\n\t\t\tthrow new RealexValidationException( \"HppRequest failed validation\", $validationMessages );\n\t\t}\n\n\t}","title":""},{"docid":"0fe2e56e216a14b65f98f9c76b5580d0","score":"0.44469246","text":"public function getExpression();","title":""},{"docid":"0fe2e56e216a14b65f98f9c76b5580d0","score":"0.44469246","text":"public function getExpression();","title":""},{"docid":"0fe2e56e216a14b65f98f9c76b5580d0","score":"0.44469246","text":"public function getExpression();","title":""}],"string":"[\n {\n \"docid\": \"87eda06add3bd1d0cda804c82bc22c64\",\n \"score\": \"0.61451733\",\n \"text\": \"public function validateExpression(\\n ExpressionNodeInterface $expressionNode,\\n ValidationContextInterface $validationContext,\\n $contextDescription\\n );\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c8f1a35578ca67d71e81f12140f11b3\",\n \"score\": \"0.58788514\",\n \"text\": \"public function validate()\\n {\\n \\n if((($this->value === null || strlen($this->value) === 0) && $this->required) || \\n !preg_match_all($this->expVal, $this->value))\\n {\\n throw $this->getError();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3a2ebb3352c5a0e202caaad61359c95\",\n \"score\": \"0.57087344\",\n \"text\": \"public static function isValid($expression)\\n {\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bca4326bf07827f3741a527f4cf7d8b7\",\n \"score\": \"0.55561876\",\n \"text\": \"public function parse()\\n {\\n // values are the final value that proceeds an operator like eq followed by a bracket\\n // first let's make a flag to show if we are in the value scope or an operator has just occurred\\n\\n $current_indentation = 0;\\n $previous_context = null;\\n\\n $base_expression = new Expression();\\n $current_expression = $base_expression;\\n\\n while ($token = $this->_tokens->peek()) {\\n // check the context\\n try {\\n $context = $this->getContext($token['type'], $previous_context, $token['value']);\\n } catch (ValidationException $e){\\n throw new ValidationException(\\\"Parse error. Invalid input around '{$token['value']}'\\\");\\n }\\n\\n $current_expression = $this->applyContextToExp($current_expression, $context, $previous_context, $token['value']);\\n $current_indentation = $this->getIndentation($current_indentation, $context);\\n $previous_context = $context;\\n }\\n\\n if(isset($context) && $context != self::CLOSE_BRACKET){\\n throw new ParseException(\\\"Malformed input, error near '\\\" . $token['value'] . \\\"'\\\");\\n }\\n if ($current_indentation != 0) {\\n throw new ParseException(\\\"Incorrect indentation\\\");\\n }\\n\\n return $base_expression;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48f4b34c548a3c471d5582382e5e13a6\",\n \"score\": \"0.5256112\",\n \"text\": \"private function getValidationExpression() : string\\n {\\n $regexp = '[+\\\\-]?\\\\d+';\\n\\n if ($this->precision > 0) {\\n $regexp .= sprintf('(\\\\.\\\\d{1,%d})?', $this->precision);\\n }\\n\\n return '~^' . $regexp . '$~';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1968b6e45d0e5c18a694f91f69aa7f78\",\n \"score\": \"0.525053\",\n \"text\": \"public function checkExpr(Context\\\\Context $context, bool $noErrors):Type\\\\Type {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1968b6e45d0e5c18a694f91f69aa7f78\",\n \"score\": \"0.525053\",\n \"text\": \"public function checkExpr(Context\\\\Context $context, bool $noErrors):Type\\\\Type {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1968b6e45d0e5c18a694f91f69aa7f78\",\n \"score\": \"0.525053\",\n \"text\": \"public function checkExpr(Context\\\\Context $context, bool $noErrors):Type\\\\Type {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1968b6e45d0e5c18a694f91f69aa7f78\",\n \"score\": \"0.525053\",\n \"text\": \"public function checkExpr(Context\\\\Context $context, bool $noErrors):Type\\\\Type {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6baf13ed943c7476eff16554b84a655\",\n \"score\": \"0.51559705\",\n \"text\": \"public function validate()\\n {\\n if ($this->isInvalid()) {\\n throw new ValidationException($this->getValidator());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28a0f80d4c958a9ec0f37b67731d12c6\",\n \"score\": \"0.5147825\",\n \"text\": \"public static function Expression($expression);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05f50334bcebaba5bfd5cff959380f63\",\n \"score\": \"0.51378846\",\n \"text\": \"public function validate(ValidationContextInterface $validationContext);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45a6c5f581b6325090dbe51366e6288e\",\n \"score\": \"0.51133406\",\n \"text\": \"public function expression($expr){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5e9a41de7d2e72c52e8ebbc9afaef7b\",\n \"score\": \"0.50917304\",\n \"text\": \"public function validate()\\n {\\n Validator::validate($this->parameters(), $this->rules());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"291c37ef04e6c4db5d86f974004b68ca\",\n \"score\": \"0.5032182\",\n \"text\": \"public function isValid($value, $context);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a9a6dc10f324044cb6f5545050423e8\",\n \"score\": \"0.5030331\",\n \"text\": \"protected function getValidator_ExpressionService()\\n {\\n return $this->services['validator.expression'] = new \\\\Symfony\\\\Component\\\\Validator\\\\Constraints\\\\ExpressionValidator();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afd041ac03d51a3b985c4c672ef7c3d3\",\n \"score\": \"0.49996603\",\n \"text\": \"private function validate()\\n {\\n if ($this->hasValidated) {\\n return;\\n }\\n\\n $this->checkDepth();\\n\\n foreach ($this->schema as $rule => $parameter) {\\n $errors = $this->validateRule($rule, $parameter);\\n $this->mergeErrors($errors);\\n }\\n\\n $this->hasValidated = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea1e8fb0c30d18727883204db8d607a2\",\n \"score\": \"0.49909204\",\n \"text\": \"public static function validate() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"840f766612b879ace84293d1c6536874\",\n \"score\": \"0.49778163\",\n \"text\": \"public function validate() {\\n\\t\\t\\n\\t\\t$data = $this->getData();\\n\\t\\t\\n\\t\\tif(!isset($data['title']) || empty($data['title'])) {\\n\\t\\t\\tGregory::get()->addError('Vous devez entrer un titre');\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(!isset($data['date']) || empty($data['date'])) {\\n\\t\\t\\tGregory::get()->addError('Vous devez entrer une date');\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($data['date']) && !preg_match('/^[0-9]{4}\\\\-[0-9]{2}\\\\-[0-9]{2}$/',$data['date'])) {\\n\\t\\t\\tGregory::get()->addError('Vous devez entrer une date au format AAAA-MM-JJ');\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(Gregory::get()->hasErrors()) throw new Exception('Votre formulaire contient des erreurs');\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94865d3003344ad6f12d7e59e21d19b7\",\n \"score\": \"0.49713233\",\n \"text\": \"private function validate()\\n {\\n $this->validationErrors = [];\\n foreach ($this->validationRules as $attr => $rules) {\\n foreach ($rules as $rule) {\\n $passed = true;\\n if ($rule['rule'] == 'required') {\\n $passed = $this->hasValue($attr);\\n } elseif ($this->hasValue($attr)) {\\n $passed = $this->validateRule($rule, $attr);\\n }\\n if (!$passed) {\\n $this->validationErrors[$attr] = $rule['message'];\\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"155e209f37f5425f2442ae1a826f7994\",\n \"score\": \"0.4964799\",\n \"text\": \"public function validate() {\\n\\t\\t// process modifier\\n\\t\\t\\tif($this->value !== NULL) {\\n\\t\\t\\t\\tforeach($this->modifier as $modifier) {\\n\\t\\t\\t\\t\\t$this->value = call_user_func($this->form->modifier[$modifier], $this->value);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t// check validator\\n\\t\\t\\tforeach($this->validator as $validator => $calls) {\\n\\t\\t\\t\\tforeach($calls as $arguments) {\\n\\t\\t\\t\\t\\tarray_unshift($arguments, $this->value);\\n\\n\\t\\t\\t\\t\\tif(call_user_func_array($this->form->validator[$validator], $arguments) !== true) {\\n\\t\\t\\t\\t\\t\\tif(!isset($this->errors)) {\\n\\t\\t\\t\\t\\t\\t\\t$this->errors = array();\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t$this->errors[] = $validator;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t// set validation status\\n\\t\\t\\tif($this->errors !== NULL) {\\n\\t\\t\\t\\t$this->valid = false;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$this->valid = true;\\n\\t\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"698ec122b37c60c63f635b842cfe0da2\",\n \"score\": \"0.49389753\",\n \"text\": \"public function validate()\\n {\\n if ($this->amount == 0) {\\n $this->errors[] = 'Amount is required';\\n } else if ($this->amount < 0) {\\n $this->errors[] = 'Amount cannot be less than 0';\\n } else if ( $this->amount > 999999.99) {\\n $this->errors[] = 'Amount cannot be greater than 999 999.99';\\n }\\n \\n //$today = date('Y-m-d');\\n $today = date_create(date('Y-m-d'));\\n \\n $todayPlusOneMonth = date_add($today, date_interval_create_from_date_string(\\\"1 month\\\"));\\n \\n $todayPlusOneMonth = date_format($todayPlusOneMonth, 'Y-m-d');\\n \\n if($today == false) {\\n \\n $this->errors[] = \\\"Some problems with calculating one month from today's date in Expenses validate function\\\";\\n }\\n\\n if ($this->date_of_expense < \\\"2000-01-01\\\" || $this->date_of_expense == 0 || $this->date_of_expense > $todayPlusOneMonth) {\\n $this->errors[] = 'Select correct date'; \\n }\\n\\n if (!isset($this->payment_method)) {\\n $this->errors[] = 'Payment method is required';\\n } else if ($this->payment_method == '0') {\\n $this->errors[] = 'Payment method is required';\\n }\\n \\n if (!isset($this->expense_category)) {\\n $this->errors[] = 'Category is required';\\n } else if ($this->expense_category == '0') {\\n $this->errors[] = 'Category is required';\\n }\\n \\n if(strlen($this->expense_comment) > 100){\\n $this->errors[] = 'Comment cannot be longer than 100 chars';\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ce49a2323d7c19ecdec9ecc22d1182a\",\n \"score\": \"0.49351776\",\n \"text\": \"abstract protected function validation();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b82aa84ac9b3fccf4d3feb77e2c57462\",\n \"score\": \"0.4913208\",\n \"text\": \"function Validify() {\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"888f3855e9d566b60914a40e73fabe49\",\n \"score\": \"0.4901926\",\n \"text\": \"function wpv_evaluate_expression($expression){\\n //Replace AND, OR, ==\\n $expression = strtoupper($expression);\\n $expression = str_replace(\\\"AND\\\", \\\"&&\\\", $expression);\\n $expression = str_replace(\\\"OR\\\", \\\"||\\\", $expression);\\n $expression = str_replace(\\\"NOT\\\", \\\"!\\\", $expression);\\n $expression = str_replace(\\\"=\\\", \\\"==\\\", $expression);\\n $expression = str_replace(\\\"!==\\\", \\\"!=\\\", $expression); // due to the line above\\n \\n // validate against allowed input characters\\n\\t$count = preg_match('/[0-9+-\\\\=\\\\*\\\\/<>&\\\\!\\\\|\\\\s\\\\(\\\\)]+/', $expression, $matches);\\n\\t\\n\\t// find out if there is full match for the entire expression\\t\\n\\tif($count > 0) {\\n\\t\\tif(strlen($matches[0]) == strlen($expression)) {\\n\\t\\t\\t \\t$valid_eval = wpv_eval_check_syntax(\\\"return $expression;\\\");\\n\\t\\t\\t \\tif($valid_eval) {\\n\\t\\t\\t \\t\\treturn eval(\\\"return $expression;\\\");\\n\\t\\t\\t \\t}\\n\\t\\t\\t \\telse {\\n\\t\\t\\t \\t\\treturn __(\\\"Error while parsing the evaluate expression\\\", 'wpv-views');\\n\\t\\t\\t \\t}\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\treturn __(\\\"Conditional expression includes illegal characters\\\", 'wpv-views');\\n\\t\\t}\\n\\t}\\n\\telse {\\n\\t\\treturn __(\\\"Correct conditional expression has not been found\\\", 'wpv-views');\\n\\t}\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0dce500ef819de0fb6485383ad2ad7c4\",\n \"score\": \"0.48998713\",\n \"text\": \"public function createRuleFailedValidation(MessageBag $errors);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc0d59b884f3e98dd3d52e722132375e\",\n \"score\": \"0.48953006\",\n \"text\": \"public function validate()\\n {\\n if (!$this->date) {\\n throw new DomainException('Mandatory field date');\\n }\\n if (count($this->transactions) == 0) {\\n throw new DomainException('No transactions for verification id \\\"' . $this->id . '\\\".');\\n }\\n\\n // validate verifications\\n $sum = 0;\\n foreach ($this->transactions as $transaction) {\\n // validate all our transactions\\n $transaction->validate();\\n // calculate sum of all transactions\\n $sum += $transaction->getAmount();\\n }\\n\\n // validate that our transactions equal zero\\n //FIXME The round() is due to precision loss in float operation. Maybe use Money\\\\Money here instead\\n if (round($sum,2) != 0) {\\n throw new DomainException('The verification id \\\"' . $this->id . '\\\" have a non-zero sum: ' . $sum);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fc605c2b5a31f26fd5177634c1aac17\",\n \"score\": \"0.48666382\",\n \"text\": \"public abstract function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0e8e300f30474503b4e497871ad269b\",\n \"score\": \"0.48468596\",\n \"text\": \"public function validate() {\\n foreach ($this->_rules as $rule) {\\n $this->_testRule($rule);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2251e2d0d3b49223874f72500098fb4d\",\n \"score\": \"0.48428264\",\n \"text\": \"public function evaluate($expression, Context $context) {\\n\\t\\t$parser = new EelParser($expression, $context);\\n\\t\\t$res = $parser->match_Expression();\\n\\t\\tif (!array_key_exists('val', $res)) {\\n\\t\\t\\tthrow new \\\\Exception('No value in result: ' . json_encode($res));\\n\\t\\t} else if ($res['val'] instanceof Context) {\\n\\t\\t\\treturn $res['val']->unwrap();\\n\\t\\t} else {\\n\\t\\t\\treturn $res['val'];\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d819d4f0ce499808104a255f71884f8\",\n \"score\": \"0.48385385\",\n \"text\": \"public function validate() {\\n\\n $validationErrors = [];\\n\\n // Check for duplication of email address across parent accounts\\n $matchingUsers = self::values(\\\"COUNT(*)\\\", \\\"WHERE emailAddress = ? AND parent_account_id = ? AND id <> ?\\\", $this->emailAddress,\\n $this->parentAccountId ? $this->parentAccountId : 0, $this->id ? $this->id : -1);\\n\\n\\n if ($matchingUsers[0] > 0)\\n $validationErrors[\\\"emailAddress\\\"] = new FieldValidationError(\\\"emailAddress\\\", \\\"duplicateEmail\\\", \\\"A user already exists with this email address\\\");\\n\\n\\n // Check for previously used password if new one supplied\\n if ($this->getId()) {\\n $passwordChange = self::values(\\\"COUNT(*)\\\", \\\"WHERE id = ? AND hashedPassword <> ?\\\",\\n $this->getId(), $this->hashedPassword);\\n\\n if ($passwordChange[0] > 0) {\\n $previousPassword = UserPasswordHistory::values(\\\"COUNT(*)\\\", \\\"WHERE user_id = ? AND hashed_password = ?\\\", $this->getId(), $this->hashedPassword);\\n if ($previousPassword[0] > 0)\\n $validationErrors[\\\"hashedPassword\\\"] = new FieldValidationError(\\\"hashedPassword\\\", \\\"previousPassword\\\", \\\"The supplied password has been used before\\\");\\n }\\n }\\n\\n return $validationErrors;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"352a2d88a0fd786c0c7acf0c6ae20634\",\n \"score\": \"0.48317906\",\n \"text\": \"protected function validate() {\\n foreach ($this->getFields() as $field) {\\n $this->errors = array_merge($this->errors, $field->validate());\\n }\\n\\n if ($this->isView() && !(method_exists($this, 'getViewSetup') and is_string($this->getViewSetup()))) {\\n $this->_addError('%s - invalid view definition');\\n }\\n\\n if (count($this->errors) > 0) {\\n throw new Exception(implode(\\\"; \\\", $this->errors));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efd62aa7717cff7c82f3995b5fb18ae\",\n \"score\": \"0.4829237\",\n \"text\": \"abstract public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ef6d0981c283635aa31bf72c1695d4f\",\n \"score\": \"0.48105127\",\n \"text\": \"public function validate()\\n\\t{\\n\\t\\t$errors = new Validation\\\\Message\\\\Group();\\n\\n\\t\\tforeach ($this->fields as $field) {\\n\\t\\t\\t$errors->appendMessages($field->validate());\\n\\t\\t}\\n\\n\\t\\tif ($errors->count() !== 0) {\\n\\t\\t\\tthrow new ValidationException($errors);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e9c752d0d320480a7ca703494fd357\",\n \"score\": \"0.48058197\",\n \"text\": \"public function validate($value);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9eb03dae0464ef80ef1342fa9ca15fc\",\n \"score\": \"0.48049557\",\n \"text\": \"public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9eb03dae0464ef80ef1342fa9ca15fc\",\n \"score\": \"0.48049557\",\n \"text\": \"public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9eb03dae0464ef80ef1342fa9ca15fc\",\n \"score\": \"0.48049557\",\n \"text\": \"public function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd89045eeb1e462b325b4f08af1b136d\",\n \"score\": \"0.4776656\",\n \"text\": \"public function validateExpression($input) {\\n\\t\\t$status = false;\\n\\n\\t\\tif($input === '') {\\n\\t\\t// Blank expressions are valid\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\n\\t\\tif(strpos($input, '®ex') !== false) {\\n\\t\\t// TODO: Still validate the rest of the expression\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\n\\t\\t$input = $this->sanitizeExpression($input);\\n\\n\\t\\t// Test for only valid characters\\n\\t\\tif(preg_match('/^[-\\\\w\\\\.\\\\:\\\\(\\\\)\\\\&\\\\@\\\\,\\\\!\\\\#]+$/i', $input)) {\\n\\t\\t\\t$status = true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// Unbalanced parens and parens without functions\\n\\t\\t// or functions without parens\\n\\n\\t\\t$ampersands = substr_count($input, '&');\\n\\t\\t$open_parens = substr_count($input, '(');\\n\\t\\t$close_parens = substr_count($input, ')');\\n\\n\\t\\tif($open_parens === $close_parens) {\\n\\t\\t\\t$status = true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\tif($ampersands == $open_parens) {\\n\\t\\t\\t$status = true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// Test for only valid function names\\n\\t\\tif(strpos($input, '&') !== false) {\\n\\t\\t\\t$function_total = preg_match_all('/\\\\&[^\\\\(]*\\\\(/',\\n\\t\\t\\t\\t$input, $functions);\\n\\t\\t\\tif($function_total == 0) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\n\\t\\t\\tforeach($functions[0] as $function) {\\n\\t\\t\\t\\tswitch($function) {\\n\\t\\t\\t\\tcase '&diff(':\\n\\t\\t\\t\\tcase '&intersect(':\\n\\t\\t\\t\\tcase '®ex(':\\n\\t\\t\\t\\tcase '®exp(':\\n\\t\\t\\t\\tcase '&union(':\\n\\t\\t\\t\\t\\t$status = true;\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tdefault:\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Test for only valid meta character sequences\\n\\t\\tif(preg_match_all('/[^-\\\\w\\\\.][^-\\\\w\\\\.]/',\\n\\t\\t\\t\\t$input, $double_matches)) {\\n\\t\\t\\t\\n\\t\\t\\tforeach($double_matches[0] as $double) {\\n\\t\\t\\t\\tswitch($double) {\\n\\t\\t\\t\\tcase ',#':\\n\\t\\t\\t\\tcase ',!':\\n\\t\\t\\t\\tcase ',&':\\n\\t\\t\\t\\tcase ',@':\\n\\t\\t\\t\\tcase '!&':\\n\\t\\t\\t\\tcase '!@':\\n\\t\\t\\t\\tcase '#!':\\n\\t\\t\\t\\tcase '#&':\\n\\t\\t\\t\\tcase '#@':\\n\\t\\t\\t\\tcase '(#':\\n\\t\\t\\t\\tcase '(!':\\n\\t\\t\\t\\tcase '(&':\\n\\t\\t\\t\\tcase '(@':\\n\\t\\t\\t\\tcase '),':\\n\\t\\t\\t\\tcase '))':\\n\\t\\t\\t\\t\\t$status = true;\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tdefault:\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $status;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da847743c09392dfb89d47e3f4e16577\",\n \"score\": \"0.47619358\",\n \"text\": \"protected function _getXpathValidationExpression()\\n {\\n return $this->_validator->getXpathValidationExpression();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a807529cfe2ddfedf179ace5082fb77\",\n \"score\": \"0.47436598\",\n \"text\": \"public function testValidateExpression()\\n\\t{\\n\\t\\t// From a a place to a transition.\\n\\t\\t// Create a place.\\n\\t\\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\\n\\t\\t$place = new PNPlace($colorSet);\\n\\t\\tTestReflection::setValue($this->object, 'input', $place);\\n\\n\\t\\t// Create a transition.\\n\\t\\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\\n\\t\\t$transition = new PNTransition($colorSet);\\n\\t\\tTestReflection::setValue($this->object, 'output', $transition);\\n\\n\\t\\t// Mock the expression.\\n\\t\\t$expression1 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\\n\\t\\t$expression1->expects($this->once())\\n\\t\\t\\t->method('execute')\\n\\t\\t\\t->will($this->returnValue(array(8, 8.2, array())));\\n\\n\\t\\tTestReflection::setValue($this->object, 'expression', $expression1);\\n\\n\\t\\t$this->assertTrue($this->object->validateExpression());\\n\\n\\t\\t// Test a sub-set of the transition color set.\\n\\t\\t$expression2 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\\n\\t\\t$expression2->expects($this->once())\\n\\t\\t\\t->method('execute')\\n\\t\\t\\t->will($this->returnValue(array(8, 8.2)));\\n\\n\\t\\tTestReflection::setValue($this->object, 'expression', $expression2);\\n\\n\\t\\t$this->assertTrue($this->object->validateExpression());\\n\\n\\t\\t// Test with non matching transition color set return values types.\\n\\t\\t$expression3 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\\n\\t\\t$expression3->expects($this->once())\\n\\t\\t\\t->method('execute')\\n\\t\\t\\t->will($this->returnValue(array('test')));\\n\\n\\t\\tTestReflection::setValue($this->object, 'expression', $expression3);\\n\\n\\t\\t$this->assertFalse($this->object->validateExpression());\\n\\n\\t\\t// Test with non matching expression arguments.\\n\\t\\t$expression4 = $this->getMockForAbstractClass('PNArcExpression', array(array('double', 'double', 'array')));\\n\\t\\tTestReflection::setValue($this->object, 'expression', $expression4);\\n\\t\\t$this->assertFalse($this->object->validateExpression());\\n\\n\\t\\t// From a transition to a place.\\n\\t\\t// Create a transition.\\n\\t\\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\\n\\t\\t$transition = new PNTransition($colorSet);\\n\\t\\tTestReflection::setValue($this->object, 'input', $transition);\\n\\n\\t\\t$colorSet = new PNColorSet(array('integer', 'double', 'array'));\\n\\t\\t$place = new PNPlace($colorSet);\\n\\t\\tTestReflection::setValue($this->object, 'output', $place);\\n\\n\\t\\t// Mock the expression.\\n\\t\\t$expression1 = $this->getMockForAbstractClass('PNArcExpression', array(array('integer', 'double', 'array')));\\n\\t\\t$expression1->expects($this->once())\\n\\t\\t\\t->method('execute')\\n\\t\\t\\t->will($this->returnValue(array(8, 8.2, array())));\\n\\n\\t\\tTestReflection::setValue($this->object, 'expression', $expression1);\\n\\n\\t\\t$this->assertTrue($this->object->validateExpression());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c996e92768fb3fe5ee49749eaf75c78\",\n \"score\": \"0.47428024\",\n \"text\": \"public function doValidate($value);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6502af97c941cd5e819e18ef2c03128\",\n \"score\": \"0.4738034\",\n \"text\": \"public function validate() {\\n $this->validator->run();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c1ec25e3ce86e19f9a9893ba2c0ac5f\",\n \"score\": \"0.47365502\",\n \"text\": \"abstract public function validate($value);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6645b4ad2c621338ba143ac3452bf3eb\",\n \"score\": \"0.47327518\",\n \"text\": \"public function setExpression($var)\\n {\\n GPBUtil::checkString($var, True);\\n $this->expression = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2065f3683d2587baff4aae2e510d531\",\n \"score\": \"0.47266635\",\n \"text\": \"final protected function validate(): void\\n {\\n if ($this->errors !== []) {\\n // already validated\\n return;\\n }\\n\\n $this->errors = [];\\n\\n foreach ($this->rules as $field => $rules) {\\n $hasValue = $this->hasValue($field);\\n $value = $this->getValue($field);\\n\\n foreach ($this->provider->getRules($rules) as $rule) {\\n if (!$hasValue && $rule->ignoreEmpty($value) && !$rule->hasConditions()) {\\n continue;\\n }\\n\\n foreach ($rule->getConditions() as $condition) {\\n if (!$condition->isMet($this, $field, $value)) {\\n // condition is not met, skipping validation\\n continue 2;\\n }\\n }\\n\\n if (!$rule->validate($this, $field, $value)) {\\n // got error, jump to next field\\n $this->errors[$field] = $rule->getMessage($field, $value);\\n break;\\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10c0fe53e195fb3ae4304022a860fc28\",\n \"score\": \"0.47261187\",\n \"text\": \"function validation() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5299af517ce4082b779d25fdd1daf8d4\",\n \"score\": \"0.47245687\",\n \"text\": \"abstract protected function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5299af517ce4082b779d25fdd1daf8d4\",\n \"score\": \"0.47245687\",\n \"text\": \"abstract protected function validate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce2ae065144b381a90172259412984b1\",\n \"score\": \"0.47060218\",\n \"text\": \"private function validate() {\\n $validator = new ProcessValidator($this->getData(), $this->validation);\\n if ($validator->fails()) {\\n throw new ProcessException($validator->getErrors(\\\"\\\\n\\\"));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9691c2d4d30b5db668063aeef4cc5586\",\n \"score\": \"0.46794862\",\n \"text\": \"public function validate()\\r\\n {\\r\\n if (empty($this->value)) {\\r\\n if ($this->isRequired()) {\\r\\n $this->addError(\\\"Please complete this field\\\");\\r\\n } else {\\r\\n return;\\r\\n }\\r\\n }\\r\\n\\r\\n if (is_string($this->value)) {\\r\\n $min = $this->getMetadata('@length', 'min');\\r\\n $max = $this->getMetadata('@length', 'max');\\r\\n\\r\\n if ($min !== null && strlen($this->value) < $min) {\\r\\n $this->addError(\\\"Minimum length is {$min} characters\\\");\\r\\n } else {\\r\\n if ($max !== null && strlen($this->value) > $max) {\\r\\n $this->addError(\\\"Maximum length is {$max} characters\\\");\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n if (is_int($this->value)) {\\r\\n $min = $this->getMetadata('@range', 'min');\\r\\n $max = $this->getMetadata('@range', 'max');\\r\\n\\r\\n if (($min !== null && $this->value < $min) || ($max !== null && $this->value > $max)) {\\r\\n $this->addError(\\\"Please enter a value in the range {$min} to {$max}\\\");\\r\\n }\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e969574e8c252585109e83c2adab43db\",\n \"score\": \"0.46722168\",\n \"text\": \"protected function _validate()\\n\\t{\\n\\t\\t$this->_validate = Validate::factory($this->_values);\\n\\t\\t\\n\\t\\t// Trim all fields\\n\\t\\t$this->_validate->filter(TRUE, 'trim');\\n\\t\\t\\n\\t\\t$fields = array_keys($this->_values);\\n\\t\\tforeach ($fields as $field)\\n\\t\\t{\\n\\t\\t\\tif ( ! empty($this->_rules[$field]))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->_validate->rules($field, $this->_rules[$field]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Set rules for required fields.\\n\\t\\tforeach ($this->_required_fields[$this->_type] as $required_field)\\n\\t\\t{\\n\\t\\t\\t// Must have a value.\\n\\t\\t\\t$this->_validate->rule($required_field, 'not_empty');\\n\\t\\t\\t\\n\\t\\t\\t// Make sure the other rules for this required field have been added.\\n\\t\\t\\tif ( ! in_array($required_field, $fields))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->_validate->rules($field, $this->_rules[$required_field]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t// TODO: Require fields based on credit card or bank account option.\\n\\t\\t\\n\\t\\t// Placeholder for transaction errors\\n\\t\\t$this->_validate->rule('transaction', TRUE);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87e1f0749cf79a1203cbc3645af662b\",\n \"score\": \"0.46652707\",\n \"text\": \"public function validate()\\n {\\n $this->prepareForValidation();\\n\\n $instance = $this->getValidatorInstance();\\n $this->addCustomValidationRules($instance);\\n\\n if (! $this->passesAuthorization()) {\\n $this->failedAuthorization();\\n } elseif (! $instance->passes()) {\\n $this->failedValidation($instance);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc3d9e9d048318dfa295c08378a00126\",\n \"score\": \"0.46521562\",\n \"text\": \"public function validate() {\\n\\t\\t$errors = $this->getErrors();\\n\\t\\tif (count($errors) > 0) {\\n\\t\\t\\tforeach ($errors as $violation) {\\n\\t\\t\\t\\t/* @var $violation Symfony\\\\Component\\\\Validator\\\\ConstraintViolation */\\n\\t\\t\\t\\t$root = $violation->getRoot();\\n\\t\\t\\t\\t$class = is_object($root) ? get_class($root) : $root;\\n\\t\\t\\t\\t$msg = \\\"{$class}.{$violation->getPropertyPath()}: {$violation->getMessage()}\\\";\\n\\t\\t\\t\\tthrow new ValidationException($msg);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn TRUE;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8beddc00da48a823efc2a898a7ea4a7\",\n \"score\": \"0.46506816\",\n \"text\": \"function _setInputErrorToContext()\\n\\t{\\n\\t\\tif($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR'))\\n\\t\\t{\\n\\t\\t\\tContext::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);\\n\\t\\t}\\n\\t\\tif($_SESSION['XE_VALIDATOR_MESSAGE'] && !Context::get('XE_VALIDATOR_MESSAGE'))\\n\\t\\t{\\n\\t\\t\\tContext::set('XE_VALIDATOR_MESSAGE', $_SESSION['XE_VALIDATOR_MESSAGE']);\\n\\t\\t}\\n\\t\\tif($_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] && !Context::get('XE_VALIDATOR_MESSAGE_TYPE'))\\n\\t\\t{\\n\\t\\t\\tContext::set('XE_VALIDATOR_MESSAGE_TYPE', $_SESSION['XE_VALIDATOR_MESSAGE_TYPE']);\\n\\t\\t}\\n\\t\\tif($_SESSION['XE_VALIDATOR_RETURN_URL'] && !Context::get('XE_VALIDATOR_RETURN_URL'))\\n\\t\\t{\\n\\t\\t\\tContext::set('XE_VALIDATOR_RETURN_URL', $_SESSION['XE_VALIDATOR_RETURN_URL']);\\n\\t\\t}\\n\\t\\tif($_SESSION['XE_VALIDATOR_ID'] && !Context::get('XE_VALIDATOR_ID'))\\n\\t\\t{\\n\\t\\t\\tContext::set('XE_VALIDATOR_ID', $_SESSION['XE_VALIDATOR_ID']);\\n\\t\\t}\\n\\t\\tif(count($_SESSION['INPUT_ERROR']))\\n\\t\\t{\\n\\t\\t\\tContext::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']);\\n\\t\\t}\\n\\n\\t\\t$this->_clearErrorSession();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ed1093e7612dc19edce0b2cbd5afb51\",\n \"score\": \"0.4642975\",\n \"text\": \"public function validateData(){\\n $validator=Validator::make($this->request->all(), array_merge($this->expeditionRules(),$this->paymentRules()));\\n if($validator->fails()){$this->status=false;}\\n return $validator;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c1eb93adc25f43c62b6de46d66b14cc\",\n \"score\": \"0.46360344\",\n \"text\": \"private function build_validate_regexp($arr_texts, $arr_expr, &$arr_names, &$arr_types) {\\r\\n \\t\\t$ret = '';\\r\\n \\t\\t$c = count($arr_expr);\\r\\n \\t\\tfor($i = 0; $i < $c; $i++) {\\r\\n \\t\\t\\t$ret .= preg_quote(array_shift($arr_texts));\\r\\n \\t\\t\\t$expr = trim($arr_expr[$i], '{}');\\r\\n \\t\\t\\t$name = '';\\r\\n \\t\\t\\t$reg_ex = $this->build_expresssion_regexp($expr, $name, $type);\\r\\n \\t\\t\\t$ret .= '(' . $reg_ex . ')';\\r\\n \\t\\t\\t$arr_names[] = $name;\\r\\n \\t\\t\\t$arr_types[] = $type;\\r\\n \\t\\t}\\r\\n \\t\\t$last = array_shift($arr_texts);\\r\\n \\t\\tswitch ($last) {\\r\\n \\t\\t\\tcase '*':\\r\\n \\t\\t\\tcase '%':\\r\\n \\t\\t\\tcase '!':\\r\\n \\t\\t\\t\\tbreak; \\t\\t\\t\\t\\r\\n \\t\\t\\tdefault:\\r\\n \\t\\t\\t\\t$ret .= preg_quote($last);\\r\\n \\t\\t\\t\\tbreak;\\r\\n \\t\\t}\\r\\n \\t\\t$ret = '#^' . $ret . '$#';\\r\\n \\t\\treturn $ret;\\r\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b24e2534e7116f997ffab763a568638e\",\n \"score\": \"0.4624857\",\n \"text\": \"public function valuesExp(string $expression, array $bind = []);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c60a9346eb076a8718142fbbcfe46eb\",\n \"score\": \"0.4622725\",\n \"text\": \"public function validate($context = 'payload')\\n {\\n $args = func_get_args();\\n array_shift($args);\\n\\n $this->each(function ($claim) use ($context, $args) {\\n $str = Str::upper(Str::substr($context, 0, 1)) . Str::substr($context, 1);\\n call_user_func_array(\\n [$claim, 'validate' . $str],\\n $args\\n );\\n });\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5546cf8956512cd29284e38549f1c64\",\n \"score\": \"0.4621007\",\n \"text\": \"public function validate() {\\r\\n $pattern=\\r\\n \\\"/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+/\\\";\\r\\n if(!preg_match($pattern,$this->email)){\\r\\n $this->setError('Invalid email address');\\r\\n }\\r\\n if (strlen($this->email)>255){\\r\\n $this->setError('Address is too long');\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d06c8d00aae136f722495ad3c8313378\",\n \"score\": \"0.46033448\",\n \"text\": \"public function setExpression($var)\\n {\\n GPBUtil::checkMessage($var, \\\\Google\\\\Api\\\\Expr\\\\V1alpha1\\\\CheckedExpr::class);\\n $this->writeOneof(2, $var);\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ac78ae3f35a89a87bbdd964106fc3e9\",\n \"score\": \"0.4596402\",\n \"text\": \"public function validates(array $validation_rules = array(), array $validation_messages = array());\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a998586a44bc6fd29657ccc03bf8a6a\",\n \"score\": \"0.459481\",\n \"text\": \"public function validate()\\n\\t{\\n\\t\\t$rules = $this->rules();\\n\\n\\t\\tforeach($rules as $rule) {\\n\\t\\t\\t//shift field names that specified in rule so in array remains only rule\\n\\t\\t\\t$subs = array_shift($rule);\\n\\t\\t\\tforeach ($subs as $sub) {\\n\\t\\t\\t\\t//search text by name of the field and call method by key of the rule\\n\\t\\t\\t\\t//so in rule 'length' => 20 we will search in $methods array a handler with key 'length'\\n\\t\\t\\t\\t$text = $this->$sub;\\n\\t\\t\\t\\t$method = $this->methods[key($rule)];\\n\\t\\t\\t\\t$this->$method($sub, $text, $rule);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $this->hasErrors();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"167a5362a89efa3b5f40ab993e5ce7ef\",\n \"score\": \"0.4586087\",\n \"text\": \"public function getEvaluationCriteria() {\\n return $this->getEvalAttribute('validation');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"539a73002a975d59eeaaf5df14b3cdf3\",\n \"score\": \"0.4577151\",\n \"text\": \"function validarExpresion($variable, $expresion){\\n\\t\\t\\t$validar = array(\\n\\t\\t\\t\\t\\t \\\"options\\\" => array(\\\"regexp\\\"=>$expresion)\\n\\t\\t\\t\\t);\\n\\t\\t\\tif(!filter_var($variable, FILTER_VALIDATE_REGEXP, $validar)){\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t\\telse{\\n\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cc728d8279f5068c6f4654a31030b44\",\n \"score\": \"0.4574859\",\n \"text\": \"public function check(){\\n\\t\\t\\t$this->prepareValues();\\n\\t\\t\\t$alerts = new Alerts();\\n\\t\\t\\t$validate = function($field, $value, $asserts) use($alerts){\\n\\t\\t\\t\\t$validators = $custom = array();\\n\\t\\t\\t\\tforeach($asserts as $assertName => $assertProperties){\\n\\t\\t\\t\\t\\t$className = 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\\\\\'.$assertName;\\n\\t\\t\\t\\t\\tif (class_exists($className)){\\n\\t\\t\\t\\t\\t\\t$validators[] = new $className($assertProperties);\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t$custom[$assertName] = $assertProperties;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$fieldAlerts = $this->app['validator']->validateValue(array($field => $value), new Asserts(array($field => $validators)));\\n\\t\\t\\t\\tforeach($fieldAlerts as $alert){\\n\\t\\t\\t\\t\\t$alerts->add(new Alert($alert->getMessage(), null, array(), null, trim($alert->getPropertyPath(), '[]'), $alert->getInvalidValue()));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (count($custom)){\\n\\t\\t\\t\\t\\tforeach($custom as $assertName => $assertProperties){\\n\\t\\t\\t\\t\\t\\t$explan = new Explan();\\n\\t\\t\\t\\t\\t\\t$expression = $explan->evaluate($assertProperties['expression'], array(\\n\\t\\t\\t\\t\\t\\t\\t'this'\\t=> $this,\\n\\t\\t\\t\\t\\t\\t\\t'value'\\t=> $value\\n\\t\\t\\t\\t\\t\\t));\\n\\t\\t\\t\\t\\t\\tif(!$expression){\\n\\t\\t\\t\\t\\t\\t\\t$alerts->add(new Alert($assertProperties['message'], null, array(), null, $field, $value));\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t};\\n\\n\\t\\t\\t// TODO: DRY!\\n\\t\\t\\tforeach($this->getScheme()->get('fields')->get() as $field => $properties){\\n\\t\\t\\t\\tif (isset($properties['validation']) && is_array($properties['validation'])){\\n\\t\\t\\t\\t\\tif (@$properties['multiple']){\\n\\t\\t\\t\\t\\t\\tif (in_array($properties['type'], array('file', 'image'))){\\n\\t\\t\\t\\t\\t\\t\\tif (is_null($this->get($field)) || get_class($this->get($field)) != 'app\\\\models\\\\helper\\\\iterator'){\\n\\t\\t\\t\\t\\t\\t\\t\\t$value = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t$id = null;\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\tforeach($this->get($field) as $id => $item){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$item = (new helper\\\\proto())->set($item);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif (!file_exists($this->app['config']->get('paths')->get('root').$item->get('route'))){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$value = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$value = new File($this->app['config']->get('paths')->get('root').$item->get('route'));\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t$validate($field.'.'.$id, $value, $properties['validation']);\\n\\t\\t\\t\\t\\t\\t} else {\\n $fieldData = $this->get($field);\\n if ($fieldData && ($fieldData instanceof helper\\\\proto) && $fieldData->get()) {\\n foreach($fieldData->get() as $id => $item){\\n $validate($field.'.'.$id, $item, $properties['validation']);\\n }\\n } else {\\n \\t$validate($field, $this->get($field), $properties['validation']);\\n }\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\tif (in_array($properties['type'], array('file', 'image'))){\\n\\t\\t\\t\\t\\t\\t\\tif (is_null($this->get($field)) || get_class($this->get($field)) != 'app\\\\models\\\\helper\\\\iterator' || !file_exists($this->app['config']->get('paths')->get('root').$this->get($field)->getFirst()->get('route'))){\\n\\t\\t\\t\\t\\t\\t\\t\\t$value = null;\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t$value = new File($this->app['config']->get('paths')->get('root').$this->get($field)->getFirst()->get('route'));\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t$value = $this->get($field);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t$validate($field, $value, $properties['validation']);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n }\\n\\n return ($alerts->count() > 0 ? $alerts : true);\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8648d5b3fdc20334e017380ca0a1be7c\",\n \"score\": \"0.4567749\",\n \"text\": \"public function validate()\\n\\t{\\n\\t\\treturn helper('validator')->validate_all($this->_attributes, $this->rules);\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a7439ae497794d507de99d9ef08eec3\",\n \"score\": \"0.45644754\",\n \"text\": \"public function validate()\\r\\n\\t{\\r\\n\\t\\tforeach ($this->reglas as $nombreCampo => $reglasCampo) {\\r\\n\\t\\t\\t$this->applyRules($nombreCampo, $reglasCampo);\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9c3da05d4b055288ef2116390fcce65\",\n \"score\": \"0.45595163\",\n \"text\": \"abstract protected function createExpression();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7cf05683331b1f753dd154c525ade332\",\n \"score\": \"0.45581523\",\n \"text\": \"public function validate($what);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9458fa68e32d5c3b4ba80e76b4da5b5\",\n \"score\": \"0.45576084\",\n \"text\": \"public function validate()\\n {\\n // TODO - Develop this\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"328140188ec5b30cf3d964f778aeb47f\",\n \"score\": \"0.45518434\",\n \"text\": \"public static function employeeValidation($data)\\n {\\n $rules = array(\\n 'first_name' => 'required',\\n 'last_name' => 'required',\\n 'company_id' => 'required'\\n );\\n\\n $messages = array(\\n\\t \\t'first_name.required' => 'Insert first name',\\n\\t \\t'last_name.required' => 'Insert last name',\\n\\t \\t'company_id.required' => 'Select a company'\\n );\\n \\n return Validator::make($data, $rules, $messages);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2de6d060f3789bb6e3d57cd1920a336\",\n \"score\": \"0.45502308\",\n \"text\": \"public function setExpr($expression) {\\n\\t\\t$this->valueList = func_get_args();\\n\\t\\t$this->expression = array_shift($this->valueList);\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"473535e63f10b8ebe1f3431743512964\",\n \"score\": \"0.45471865\",\n \"text\": \"public function setExpression($expression) {\\n $this->expression = $expression;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc323b3e70e9f1a13f4f5845a9f3f937\",\n \"score\": \"0.45292997\",\n \"text\": \"public function addFieldValidationRule(array $configuration);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65e8b8990858356a03056bc8a0579bd4\",\n \"score\": \"0.45040745\",\n \"text\": \"public static function clean($expression)\\n {\\n return Util::unwrap(\\n Util::toString($expression, true)\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6d54ebaa330f16f1862a13961a2daa2\",\n \"score\": \"0.4499778\",\n \"text\": \"public function validate(): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6d54ebaa330f16f1862a13961a2daa2\",\n \"score\": \"0.4499778\",\n \"text\": \"public function validate(): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07b894fa3538d15be53281ff30760c46\",\n \"score\": \"0.44897607\",\n \"text\": \"public function validate()\\n {\\n\\n $this->rules();\\n $this->filters();\\n\\n //aplicar todos los filtros\\n foreach ($this->_formFilters as $filterToApply) {\\n\\n $attributeToEval = $filterToApply['attribute'];\\n\\n if (!property_exists($this,$attributeToEval)) {\\n\\n throw new Exception(\\\"El atributo {$attributeToEval} no existe\\\");\\n }\\n\\n $methodTobeUsed = \\\"filter\\\" . ucfirst($filterToApply['filter']);\\n\\n if (!method_exists($this, $methodTobeUsed)) {\\n\\n throw new Exception(\\\"El método {$methodTobeUsed} no existe, no se puede filtrar\\n el atributo {$attributeToEval}\\\");\\n }\\n\\n $this->{$methodTobeUsed}($attributeToEval);\\n\\n }\\n\\n //validar todas las reglas\\n foreach ($this->_formRules as $ruleToEval) {\\n\\n $attributeToEval = $ruleToEval['attribute'];\\n\\n if (!property_exists($this,$attributeToEval)) {\\n\\n throw new Exception(\\\"El atributo {$attributeToEval} no existe\\\");\\n }\\n\\n $methodTobeUsed = \\\"rule\\\" . ucfirst($ruleToEval['rule']);\\n\\n if (!method_exists($this, $methodTobeUsed)) {\\n\\n throw new Exception(\\\"El método {$methodTobeUsed} no existe, no se puede validar\\n el atributo {$attributeToEval}\\\");\\n }\\n\\n $this->{$methodTobeUsed}($attributeToEval);\\n\\n }\\n\\n\\n //si el atributo _formErrors tiene valores, entonces el formulario no es valido.\\n if(count($this->_formErrors) > 0 ){\\n\\n return false;\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"208997cddb8e3a527f7744935a34d837\",\n \"score\": \"0.4488532\",\n \"text\": \"public function processValidated()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"208997cddb8e3a527f7744935a34d837\",\n \"score\": \"0.4488532\",\n \"text\": \"public function processValidated()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba8fbe89c1f0eba45c33b2be4450350a\",\n \"score\": \"0.44876486\",\n \"text\": \"public function validation()\\n {\\n $validator = new Validation();\\n\\n $validator->add(\\n 'email',\\n new EmailValidator(\\n [\\n 'model' => $this,\\n 'message' => 'Please enter a correct email address',\\n ]\\n )\\n );\\n\\n return $this->validate($validator);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba8fbe89c1f0eba45c33b2be4450350a\",\n \"score\": \"0.44876486\",\n \"text\": \"public function validation()\\n {\\n $validator = new Validation();\\n\\n $validator->add(\\n 'email',\\n new EmailValidator(\\n [\\n 'model' => $this,\\n 'message' => 'Please enter a correct email address',\\n ]\\n )\\n );\\n\\n return $this->validate($validator);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba8fbe89c1f0eba45c33b2be4450350a\",\n \"score\": \"0.44876486\",\n \"text\": \"public function validation()\\n {\\n $validator = new Validation();\\n\\n $validator->add(\\n 'email',\\n new EmailValidator(\\n [\\n 'model' => $this,\\n 'message' => 'Please enter a correct email address',\\n ]\\n )\\n );\\n\\n return $this->validate($validator);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08ffab953088f894523bf8d5843fbe0b\",\n \"score\": \"0.44860488\",\n \"text\": \"public function addValidationError()\\n {\\n $this->_validationError = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"444ac68cab69ead3dc9112a05827b284\",\n \"score\": \"0.44666982\",\n \"text\": \"public function validate(\\\\Closure $closure): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70d9ed40b5f367b58724a1f0e4d148c9\",\n \"score\": \"0.44660297\",\n \"text\": \"public function Process() {\\n\\t\\t\\n\\t\\tforeach($this->_rules as $i) {\\n\\t\\t\\t$rule = $i[0];\\n\\t\\t\\t$param = $i[1];\\n\\t\\t\\t$methodName = '_is'.ucfirst($rule);\\n\\t\\t\\t$method = new ReflectionMethod('validator', $methodName);\\n\\t\\t\\t\\n\\t\\t\\tif(sizeof($method->getParameters()) > 1) {\\n\\t\\t\\t\\t$result = $this->$methodName($this->_variable, $param);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$result = $this->$methodName($this->_variable);\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\tif($result === false) {\\n\\t\\t\\t\\t$this->_exceptions[] = new validatorexception($this->_variable, $rule, $param);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(sizeof($this->_exceptions)) {\\n\\t\\t\\treturn false;\\n\\t\\t} else {\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fd78730aebd311b7bb782182be25328\",\n \"score\": \"0.4457546\",\n \"text\": \"public function rules()\\n {\\n return [\\n 'amount' => 'required|numeric|min:0|digits_between:0,11',\\n 'exp_month' => 'required|integer|min:0|max:12',\\n 'exp_year' => 'required|integer|digits:2',\\n 'cvv' => 'required|integer|digits:3'\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a58537eb58d2f38f53e2f5217a4e96d\",\n \"score\": \"0.44559518\",\n \"text\": \"public function validate() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f522e021b6cdb3c4b084efa69a669f7\",\n \"score\": \"0.445085\",\n \"text\": \"public static function validate( HppRequest $hppRequest ) {\\n\\t\\tself::Initialise();\\n\\n\\t\\t$violations = self::$validator->validate( $hppRequest );\\n\\n\\t\\tif ( $violations->count() > 0 ) {\\n\\t\\t\\t$validationMessages = array();\\n\\n\\t\\t\\tforeach ( $violations as $violation ) {\\n\\n\\t\\t\\t\\t/* @var ConstraintViolationInterface $violation */\\n\\t\\t\\t\\t$validationMessages[] = $violation->getMessage();\\n\\t\\t\\t}\\n\\n\\t\\t\\t$message = \\\"HppRequest failed validation with the following errors:\\\";\\n\\t\\t\\tforeach ( $validationMessages as $validationMessage ) {\\n\\t\\t\\t\\t$message .= $validationMessage . '.';\\n\\t\\t\\t}\\n\\n\\t\\t\\tself::$logger->info( $message );\\n\\t\\t\\tthrow new RealexValidationException( \\\"HppRequest failed validation\\\", $validationMessages );\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fe2e56e216a14b65f98f9c76b5580d0\",\n \"score\": \"0.44469246\",\n \"text\": \"public function getExpression();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fe2e56e216a14b65f98f9c76b5580d0\",\n \"score\": \"0.44469246\",\n \"text\": \"public function getExpression();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fe2e56e216a14b65f98f9c76b5580d0\",\n \"score\": \"0.44469246\",\n \"text\": \"public function getExpression();\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":585,"cells":{"query_id":{"kind":"string","value":"22a7040e7c00d1cc88df3a26743e5906"},"query":{"kind":"string","value":"Load the lost password email template"},"positive_passages":{"kind":"list like","value":[{"docid":"314e6d4b1ebb078e59408dfdce69f08a","score":"0.7012861","text":"function hma_lost_password_email( $message, $key ) {\n\n\t$user = get_user_by_email(trim($_POST['user_login']));\n\t$reset_url = get_bloginfo( 'lost_password_url', 'display' ) . '?action=rp&key=' . $key . '&login=' . $user->user_login;\n\n\t// TODO this template path should be filterable\n\tif ( file_exists( $file = get_stylesheet_directory() . '/email.lost-password.php' ) ) {\n\t\tob_start();\n\t\tinclude( $file );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\t}\n\n\treturn $message;\n\n}","title":""}],"string":"[\n {\n \"docid\": \"314e6d4b1ebb078e59408dfdce69f08a\",\n \"score\": \"0.7012861\",\n \"text\": \"function hma_lost_password_email( $message, $key ) {\\n\\n\\t$user = get_user_by_email(trim($_POST['user_login']));\\n\\t$reset_url = get_bloginfo( 'lost_password_url', 'display' ) . '?action=rp&key=' . $key . '&login=' . $user->user_login;\\n\\n\\t// TODO this template path should be filterable\\n\\tif ( file_exists( $file = get_stylesheet_directory() . '/email.lost-password.php' ) ) {\\n\\t\\tob_start();\\n\\t\\tinclude( $file );\\n\\t\\t$message = ob_get_contents();\\n\\t\\tob_end_clean();\\n\\t}\\n\\n\\treturn $message;\\n\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"3756d90da9b933afe9fcafb25f3f9e3a","score":"0.67789984","text":"function Trigger_ForgotPassword_Email(&$tNG) {\r\n\r\n $emailObj = new tNG_Email($tNG);\r\n\r\n $emailObj->setFrom(\"{KT_defaultSender}\");\r\n\r\n $emailObj->setTo(\"{email}\");\r\n\r\n $emailObj->setCC(\"\");\r\n\r\n $emailObj->setBCC(\"\");\r\n\r\n $emailObj->setSubject(\"Vos informations de connexion\");\r\n\r\n //FromFile method\r\n\r\n $emailObj->setContentFile(\"includes/mailtemplates/forgot.html\");\r\n\r\n $emailObj->setEncoding(\"ISO-8859-1\");\r\n\r\n $emailObj->setFormat(\"HTML/Text\");\r\n\r\n $emailObj->setImportance(\"Normal\");\r\n\r\n return $emailObj->Execute();\r\n\r\n}","title":""},{"docid":"d5ecf53db94becd2c55b5b160605ad05","score":"0.67743593","text":"function hma_lost_password_email( $message, $key ) {\n\n\t$user = get_user_by( 'email', sanitize_email( $_POST['user_login'] ) ); // field is called user_login though wil contain an email address\n\t$reset_url = hma_get_lost_password_url() . '?action=rp&key=' . $key . '&login=' . $user->user_login;\n\n\tif ( file_exists( $file = apply_filters( 'hma_lost_password_email_path', get_stylesheet_directory() . '/email.lost-password.php' ) ) ) {\n\t\tob_start();\n\t\tinclude( $file );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\n\t\tadd_filter( 'wp_mail_content_type', 'wp_mail_content_type_html' );\n\t}\n\n\treturn $message;\n\n}","title":""},{"docid":"2ad204f86bbc4df12c92a9cf36e9ccb8","score":"0.6559396","text":"public function fpwd(){\n\t\t\t$this->load->view('template/forgotpass');\n\t\t}","title":""},{"docid":"b47305b67984abf3dd07b19ae09be6a5","score":"0.6537628","text":"function hma_reset_password_email( $message, $new_pass ) {\n\n\t$user = get_userdatabylogin( $_GET['login'] );\n\n\t// TODO template path should be filterable\n\tif ( file_exists( $file = get_stylesheet_directory() . '/email.reset-password.php' ) ) {\n\t\tob_start();\n\t\tinclude( $file );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\t}\n\n\treturn $message;\n\n}","title":""},{"docid":"ddd7656dbea1c45435782ed7d1f51e3d","score":"0.64925086","text":"function forgotten_pass(){\n require_once('trellian/forget_password.php');\n \n require_once('trellian/db.php');\n $sub_conn = trellian_db_connect('submissions', 'www-data');\n \n $TemplateVars['template']='forgotten-pass';\n if(isset($_REQUEST['lostpass'])){\n $TemplateVars=send_reset_password_mail_to_user($_REQUEST['username'] ,'', 'www.hostedhash.com');\n }\n return $TemplateVars;\n}","title":""},{"docid":"1209a71ef26d604459e55ad2dfde5037","score":"0.6482605","text":"function hma_reset_password_email( $message, $new_pass ) {\n\n\t$user = get_user_by( 'login', sanitize_text_field( $_GET['login'] ) );\n\n\t// TODO template path should be filterable\n\tif ( file_exists( $file = apply_filters( 'hma_reset_password_email_path', get_stylesheet_directory() . '/email.reset-password.php' ) ) ) {\n\t\tob_start();\n\t\tinclude( $file );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\n\t\tadd_filter( 'wp_mail_content_type', 'wp_mail_content_type_html' );\n\t}\n\n\treturn $message;\n\n}","title":""},{"docid":"b28366725c97b88e77665e2482cb8679","score":"0.6338702","text":"public function passwordfailed(){\n\t\t\t$this->load->view('template/pwdfailed');\t\t\t\n\t\t}","title":""},{"docid":"08751374c9c96da6c49ed45dde626945","score":"0.63077843","text":"function forgot_password() {\n $datos['titulo'] = \"Restablecer Contraseña\";\n $this->render_page('usuarios/forgot_password', $datos);\n }","title":""},{"docid":"4145c807253d81e384733f5d31817327","score":"0.6287908","text":"function getForgotPasswordFormHTML()\n {\n\t\tif ($this->debug) {echo \"getForgotPasswordFormHTML()\"; }\n\t\t$html = $this->getTemplate($this->templatePathEnterEmail);\n\t\t\n\t\tif (''==$html) {\n\t\t\t$html = $this->getForgotPasswordFormHTMLBackup();\n\t\t} else {\n\t\t\t\n\t\t\t$html = $this->prepareTemplate(\n\t\t\t\t$html\n\t\t\t\t, array($this->templateMarkerFieldNameEmailOrUserName)\n\t\t\t\t, array($this->fieldNameEmailOrUserName) \n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $html;\n }","title":""},{"docid":"777fa2230c70c70a1f9bccbaf25b56f3","score":"0.6197122","text":"public function newpasswordconfirmation(){\n\t\t\t$this->load->view('template/newpassconfirmation');\n\n\t\t}","title":""},{"docid":"500b604deeeaf63a8a9ffd3e3351c521","score":"0.61951214","text":"public function getPageFormRecoveryEmail()\n\t{\n\t\t$content =\n\t\t'\n\t\t
Mot de passe oublié
\n\t\t Mot de passe oublié
\n\t\t\t'. $this->getFormNewPassword('sendRecoveryRequest()');\n\n\t\treturn parent::generatePage($content, array('RecoveryPassword'));\n\t}","title":""},{"docid":"d510891b13e503a05f01042b03b82acf","score":"0.6082034","text":"public function forgot_password(){\n $this->User->set($this->request->data);\n if($this->User->validates(array('fieldList'=>array('email')))){\n \n $this->layout='ajax';\t\t\n\n $rs=$this->User->findByEmail($this->request->data['User']['email']);\n if($rs){\n\n $email = $rs['User']['email'];\n $name = $rs['User']['first_name'];\n $newPass = $this->Core->generatePassword();\n $from = \"\";\n $to = $email;\n /*Encrypt userid with encryption key****/\n $key=$this->User->mc_encrypt(ENCRYPTION_KEY,$rs['User']['user_id']);\n /*Encrypt userid with encryption key****/\n $link=SITE_URL.'/logins/reset_password/?authenticationKey='.$key;\n\t\t\t\t /*-template asssignment if any*/\n $this->loadModel('EmailTemplate');\n\t\t\t\t$template = $this->EmailTemplate->find('first',\n\t\t\t\t array('conditions' => array(\n\t\t\t\t\t'email_identifier'=> 'reset_password_link'\n\t\t\t\t\t)\n\t\t\t\t )\n\t\t\t\t);\n\t\t\t\tif($template){\t\n\t\t\t\t $arrFind=array('{{NAME}}','{{link}}');\n\t\t\t\t $arrReplace=array($name,$link);\n\t\t\t\t $from=$template['EmailTemplate']['from_email'];\n\t\t\t\t $subject=$template['EmailTemplate']['subject'];\n\t\t\t\t $content=str_replace($arrFind, $arrReplace,$template['EmailTemplate']['content']);\n\t\t\t\t $mailResult=$this->sendEmail($to,$from,$subject,$content);\n\t\t\t\t}\n \t\t\t\t\n if($mailResult){\t\t\t\t\n echo '