Ejemplo n.º 1
0
<?php

/**
 * Description of User
 *
 * @author temp
 */
require_once realpath(dirname(__FILE__)) . '/Model.php';
require_once realpath(dirname(__FILE__)) . '/Access.php';
Kernel::package('kernerl');
abstract class User extends Model
{
    //put attr code here
    private $id;
    private $username;
    private $password;
    private $hashtype;
    private $verified;
    protected $super;
    function __construct()
    {
        $this->id = Constrain::pk($this);
        $this->username = Input::create_text('username');
        $this->password = Input::create_password('password');
        $this->hashtype = Input::create_hidden('hashtype');
        $this->hashtype->set($this->hash_type());
        $this->super = false;
    }
    public function autenticate()
    {
        $p = Persistence::getInstance();
Ejemplo n.º 2
0
<?php

/**
*   @name: Datos_personales
*/
Kernel::package('package1');
class Datos_personales extends Model
{
    private $id;
    private $identificacion;
    private $nombres;
    private $apellidos;
    private $telefono;
    private $email;
    private $direccion;
    public function __construct()
    {
        $this->id = Constrain::pk($this);
        $this->identificacion = Input::create_text('identificacion');
        $this->nombres = Input::create_text('nombres');
        $this->apellidos = Input::create_text('apellidos');
        $this->telefono = Input::create_text('telefono');
        $this->email = Input::create_text('email');
        $this->direccion = Input::create_text('direccion');
    }
    public function __toString()
    {
        return " id: " . $this->id->val() . " identificacion: " . $this->identificacion->val() . " nombres: " . $this->nombres->val() . " apellidos: " . $this->apellidos->val() . " telefono: " . $this->telefono->val() . " email: " . $this->email->val() . " direccion: " . $this->direccion->val() . '';
    }
    public function setId($id)
    {