当前位置: 首页>>代码示例>>PHP>>正文


PHP Usuario::toArray方法代码示例

本文整理汇总了PHP中Usuario::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Usuario::toArray方法的具体用法?PHP Usuario::toArray怎么用?PHP Usuario::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Usuario的用法示例。


在下文中一共展示了Usuario::toArray方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: inicializar

 function inicializar()
 {
     // Titulo del template
     $this->asignar('accion_usuarios', "Modificación");
     // Cargar los datos del Usuario
     $usuario = new Usuario(intval($_GET['id']));
     $this->asignarArray($usuario->toArray());
     // Asigno clave vacia para que se pueda modificar
     $this->asignar('clave', "");
     // Roles
     $this->asignar('options_rol', ComboRol());
     // Seteo que el nombre de usuario no se pueda modificar
     $this->asignar('modificable', "readonly");
 }
开发者ID:Nilphy,项目名称:moteguardian,代码行数:14,代码来源:accion.UsuarioMod.php

示例2: toArray

 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return    array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Usuario_intereses'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Usuario_intereses'][$this->getPrimaryKey()] = true;
     $keys = Usuario_interesesPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getId_usuario(), $keys[2] => $this->getId_genero());
     if ($includeForeignObjects) {
         if (null !== $this->aUsuario) {
             $result['Usuario'] = $this->aUsuario->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aGenero) {
             $result['Genero'] = $this->aGenero->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
开发者ID:rodolfobais,项目名称:proylectura,代码行数:33,代码来源:BaseUsuario_intereses.php

示例3: toArray

 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return    array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Solicitud_amistad'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Solicitud_amistad'][$this->getPrimaryKey()] = true;
     $keys = Solicitud_amistadPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getId_usuario_solicitado(), $keys[2] => $this->getId_usuario_solicitante(), $keys[3] => $this->getestado());
     if ($includeForeignObjects) {
         if (null !== $this->aUsuarioRelatedById_usuario_solicitado) {
             $result['UsuarioRelatedById_usuario_solicitado'] = $this->aUsuarioRelatedById_usuario_solicitado->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUsuarioRelatedById_usuario_solicitante) {
             $result['UsuarioRelatedById_usuario_solicitante'] = $this->aUsuarioRelatedById_usuario_solicitante->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
开发者ID:rodolfobais,项目名称:proylectura,代码行数:33,代码来源:BaseSolicitud_amistad.php

示例4: toArray

 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['PedidoProveedor'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['PedidoProveedor'][$this->getPrimaryKey()] = true;
     $keys = PedidoProveedorPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getFecha(), $keys[2] => $this->getDescripcion(), $keys[3] => $this->getEstado(), $keys[4] => $this->getUsuarioId(), $keys[5] => $this->getProveedorId(), $keys[6] => $this->getSerie(), $keys[7] => $this->getDocumento());
     if ($includeForeignObjects) {
         if (null !== $this->aUsuario) {
             $result['Usuario'] = $this->aUsuario->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aProveedor) {
             $result['Proveedor'] = $this->aProveedor->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collDetallePedidoProveedors) {
             $result['DetallePedidoProveedors'] = $this->collDetallePedidoProveedors->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
开发者ID:kcornejo,项目名称:usac,代码行数:36,代码来源:BasePedidoProveedor.php

示例5: toArray

 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return    array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Notificacion'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Notificacion'][$this->getPrimaryKey()] = true;
     $keys = NotificacionPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getId_emisor(), $keys[2] => $this->getId_receptor(), $keys[3] => $this->getDescripcion(), $keys[4] => $this->getId_tipo_notificacion(), $keys[5] => $this->getLeido());
     if ($includeForeignObjects) {
         if (null !== $this->aUsuarioRelatedById_emisor) {
             $result['UsuarioRelatedById_emisor'] = $this->aUsuarioRelatedById_emisor->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUsuarioRelatedById_receptor) {
             $result['UsuarioRelatedById_receptor'] = $this->aUsuarioRelatedById_receptor->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aTipo_notificacion) {
             $result['Tipo_notificacion'] = $this->aTipo_notificacion->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
开发者ID:rodolfobais,项目名称:proylectura,代码行数:36,代码来源:BaseNotificacion.php

示例6: ActualizarDatos

function ActualizarDatos()
{
    session_start();
    if (!isset($_SESSION['Usuario'])) {
        Respoder(false, 'Debe iniciar sesión', null);
    }
    $user = new Usuario();
    $user->get('idUsuario', $_SESSION['Usuario']['idUsuario']);
    if (!$user->md_estado) {
        Respoder(false, 'No se pudo obtener el usuario', null);
    }
    if (!(($user->dni = filter_input(INPUT_POST, 'dni', FILTER_VALIDATE_INT)) && ($user->nombres = filter_input(INPUT_POST, 'nombres', FILTER_SANITIZE_STRING)) && ($user->apellidos = filter_input(INPUT_POST, 'apellidos', FILTER_SANITIZE_STRING)) && ($user->email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL)))) {
        Respoder(false, 'Error al recibir parámetros', null);
    }
    $uAux = new Usuario();
    if ($user->dni != $_SESSION['Usuario']['dni'] && $uAux->get('dni', $user->dni)) {
        Respoder(false, 'Este DNI no está disponible', null);
    }
    if ($user->email != $_SESSION['Usuario']['email'] && $uAux->get('email', $user->email)) {
        Respoder(false, 'Este email no está disponible', null);
    }
    if ($user->edit()) {
        $_SESSION['Usuario'] = $user->toArray();
        Respoder(true, 'Información actualizada', null);
    } else {
        Respoder(false, $user->md_mensaje, $user->md_detalle);
    }
}
开发者ID:MarlonEnmanuel,项目名称:unprg-web-old,代码行数:28,代码来源:ctrlUsuario.php

示例7: toArray

 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Transaccion'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Transaccion'][$this->getPrimaryKey()] = true;
     $keys = TransaccionPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getSerie(), $keys[2] => $this->getDocumento(), $keys[3] => $this->getClienteId(), $keys[4] => $this->getUsuarioId(), $keys[5] => $this->getTipoTransaccionId(), $keys[6] => $this->getNoTarjeta(), $keys[7] => $this->getTotal(), $keys[8] => $this->getDireccion(), $keys[9] => $this->getTipoPagoId());
     if ($includeForeignObjects) {
         if (null !== $this->aCliente) {
             $result['Cliente'] = $this->aCliente->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUsuario) {
             $result['Usuario'] = $this->aUsuario->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aTipoTransaccion) {
             $result['TipoTransaccion'] = $this->aTipoTransaccion->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aTipoPago) {
             $result['TipoPago'] = $this->aTipoPago->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
开发者ID:kcornejo,项目名称:usac,代码行数:39,代码来源:BaseTransaccion.php

示例8: cambiarContra

 protected function cambiarContra()
 {
     $Usuario = $this->checkAccess();
     $ipts = $this->getFilterInputs('post', array('pass' => array('string', 40, 40), 'nuevoPass' => array('string', 40, 40), 'nuevoPass2' => array('string', 40, 40)));
     if ($Usuario['password'] != $ipts['pass']) {
         $this->responder(false, 'Contraseña incorrecta');
     }
     if ($ipts['nuevoPass'] != $ipts['nuevoPass']) {
         $this->responder(false, 'Las contraseñas no coinciden');
     }
     $mysqli = $this->getMysqli();
     $user = new Usuario($mysqli, $Usuario['id']);
     $user->get();
     $user->password = $ipts['nuevoPass'];
     if (!$user->edit()) {
         $this->responder(false, 'Error al guardar cambios', $user->md_detalle);
     }
     $_SESSION['Usuario'] = $user->toArray();
     $this->responder(true, 'Cambios guardados');
 }
开发者ID:MarlonEnmanuel,项目名称:unprg-web-old,代码行数:20,代码来源:ctrlUsuario.php

示例9: toArray

 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return    array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Libro'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Libro'][$this->getPrimaryKey()] = true;
     $keys = LibroPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getNombre(), $keys[2] => $this->getFecha(), $keys[3] => $this->getId_genero(), $keys[4] => $this->getAutor(), $keys[5] => $this->getImage(), $keys[6] => $this->getSinopsis(), $keys[7] => $this->getFecha_ult_acc(), $keys[8] => $this->getHora_ult_acc(), $keys[9] => $this->getUsuario_ult_acc(), $keys[10] => $this->getId_privacidad(), $keys[11] => $this->getEs_editable(), $keys[12] => $this->getId_usuario(), $keys[13] => $this->getDebaja(), $keys[14] => $this->getEstado());
     if ($includeForeignObjects) {
         if (null !== $this->aUsuarioRelatedByUsuario_ult_acc) {
             $result['UsuarioRelatedByUsuario_ult_acc'] = $this->aUsuarioRelatedByUsuario_ult_acc->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aPrivacidad) {
             $result['Privacidad'] = $this->aPrivacidad->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aGenero) {
             $result['Genero'] = $this->aGenero->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUsuarioRelatedById_usuario) {
             $result['UsuarioRelatedById_usuario'] = $this->aUsuarioRelatedById_usuario->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collAudiolibros) {
             $result['Audiolibros'] = $this->collAudiolibros->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collCalificacions) {
             $result['Calificacions'] = $this->collCalificacions->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collComentarios) {
             $result['Comentarios'] = $this->collComentarios->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collLibro_colaboradors) {
             $result['Libro_colaboradors'] = $this->collLibro_colaboradors->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collLibro_versions) {
             $result['Libro_versions'] = $this->collLibro_versions->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSolicituds) {
             $result['Solicituds'] = $this->collSolicituds->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSlider_maes) {
             $result['Slider_maes'] = $this->collSlider_maes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collPostulantess) {
             $result['Postulantess'] = $this->collPostulantess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collClasificadoss) {
             $result['Clasificadoss'] = $this->collClasificadoss->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
开发者ID:rodolfobais,项目名称:proylectura,代码行数:66,代码来源:BaseLibro.php


注:本文中的Usuario::toArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。