當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Kernel::package方法代碼示例

本文整理匯總了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();
開發者ID:exildev,項目名稱:q-stad,代碼行數:31,代碼來源:User.php

示例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)
    {
開發者ID:exildev,項目名稱:q-stad,代碼行數:31,代碼來源:Datos_personales.php


注:本文中的Kernel::package方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。