本文整理汇总了PHP中Kernel::package方法的典型用法代码示例。如果您正苦于以下问题:PHP Kernel::package方法的具体用法?PHP Kernel::package怎么用?PHP Kernel::package使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kernel
的用法示例。
在下文中一共展示了Kernel::package方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
<?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();
示例2: __construct
<?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)
{