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


PHP self::fill方法代碼示例

本文整理匯總了PHP中self::fill方法的典型用法代碼示例。如果您正苦於以下問題:PHP self::fill方法的具體用法?PHP self::fill怎麽用?PHP self::fill使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在self的用法示例。


在下文中一共展示了self::fill方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: newUser

 public static function newUser($dbc, $fn, $ln, $email, $pwd, $sa, $pc, $DOB, $gender)
 {
     $instance = new self($email, $pwd);
     $instance->fill($fn, $ln, $sa, $pc, $DOB, $gender);
     $instance->insertUser($dbc);
     return $instance;
 }
開發者ID:Jordy281,項目名稱:Web-Centric,代碼行數:7,代碼來源:User.php

示例2: instantiate

 public static function instantiate(User $admin, array $data)
 {
     $instance = new self();
     $instance->author()->associate($admin);
     $instance->fill($data)->save();
     return $instance;
 }
開發者ID:gez-studio,項目名稱:gez-mall,代碼行數:7,代碼來源:Article.php

示例3: fromRow

 public static function fromRow(array $row)
 {
     // 'constructor' using db query row
     $instance = new self();
     $instance->fill($row);
     return $instance;
 }
開發者ID:cpausmit,項目名稱:Tapas,代碼行數:7,代碼來源:Student.php

示例4: instantiate

 public static function instantiate($seller, array $data)
 {
     $instance = new self();
     $instance->seller()->associate($seller);
     $instance->fill($data)->save();
     return $instance;
 }
開發者ID:gez-studio,項目名稱:gez-mall,代碼行數:7,代碼來源:ShippingCondition.php

示例5: order

 /**
  * Create an Order
  *
  * @param array $items
  * @param $user_id
  *
  * @return Order
  */
 public function order($user_id, $data = null)
 {
     $order = new self();
     $order->user_id = $user_id;
     $order->items_number = 0;
     $order->items_total = 0;
     if ($data) {
         $order->fill($data);
     }
     $order->state = config("shop.status_init");
     $order->save();
     return $order;
 }
開發者ID:neyromanser,項目名稱:laravel-shop,代碼行數:21,代碼來源:Order.php

示例6: loadById

    /**
     * Load the material type by the given id.
     *
     * @param integer $id
     *
     * @return \self
     */
    public static function loadById($id)
    {
        $sql = '
			SELECT
				`materialTypeId`,
				`name`
			FROM materialTypes
			WHERE `materialTypeId` = ' . \sqlval($id) . '
				AND !deleted
		';
        $materialType = \query($sql);
        $obj = new self();
        $obj->fill($materialType);
        return $obj;
    }
開發者ID:friend8,項目名稱:DSA-Blacksmith,代碼行數:22,代碼來源:MaterialType.php

示例7: loadById

    /**
     * Load a material by ID
     *
     * @param integer $id
     *
     * @return \self
     */
    public static function loadById($id)
    {
        $sql = '
			SELECT
				`materialId`,
				`materialTypeId`,
				`name`,
				additional
			FROM materials
			WHERE `materialId` = ' . \sqlval($id) . '
				AND !deleted
		';
        $material = \query($sql);
        $obj = new self();
        $obj->fill($material);
        $obj->loadMaterialAssets();
        return $obj;
    }
開發者ID:friend8,項目名稱:DSA-Blacksmith,代碼行數:25,代碼來源:Material.php

示例8: loadById

    /**
     * Load an item type by its id.
     *
     * @param integer $id
     *
     * @return \self
     */
    public static function loadById($id)
    {
        $sql = '
			SELECT
				`itemTypeId`,
				`name`,
				`type`,
				`talentPoints`,
				`time`
			FROM itemTypes
			WHERE `itemTypeId` = ' . \sqlval($id) . '
				AND !deleted
		';
        $itemType = query($sql);
        $obj = new self();
        $obj->fill($itemType);
        return $obj;
    }
開發者ID:friend8,項目名稱:DSA-Blacksmith,代碼行數:25,代碼來源:ItemType.php

示例9: order

 /**
  * Create an Order
  *
  * @param array $items
  * @param $user_id
  *
  * @return Order
  */
 public function order($user_id, $data = null, $draft = FALSE)
 {
     $order = new self();
     $order->user_id = $user_id;
     $order->items_number = 0;
     $order->items_total = 0;
     if ($data) {
         $order->fill($data);
     }
     if (!$draft) {
         $order = $this->removeInvalidAttributes($order);
         $order->state = config("order.init");
         $order->save();
     } else {
         //Allocate fake id
         $order->state = 'draft';
         $order->id = 0;
     }
     return $order;
 }
開發者ID:oupai365,項目名稱:laravel-order,代碼行數:28,代碼來源:Order.php

示例10: loadById

    /**
     * Load a technique by the given id.
     *
     * @param integer $id
     *
     * @return \self
     */
    public static function loadById($id)
    {
        $sql = '
			SELECT
				`techniqueId`,
				`name`,
				`timeFactor`,
				`priceFactor`,
				proof,
				`breakFactor`,
				`hitPoints`,
				`noOtherAllowed`,
				unsellable
			FROM techniques
			WHERE `techniqueId` = ' . \sqlval($id) . '
				AND !deleted
		';
        $technique = query($sql);
        $obj = new self();
        $obj->fill($technique);
        return $obj;
    }
開發者ID:friend8,項目名稱:DSA-Blacksmith,代碼行數:29,代碼來源:Technique.php

示例11: instantiate

 public static function instantiate(User $user, array $data, array $tags = [])
 {
     $instance = new self();
     $instance->author()->associate($user);
     $instance->fill($data)->save();
     if ($tags) {
         $instance->tags()->attach($tags);
     }
     return $instance;
 }
開發者ID:gez-studio,項目名稱:gez-mall,代碼行數:10,代碼來源:Post.php

示例12: withDetails

 public static function withDetails($aUserLogin, $aUserFirstName, $aUserLastName, $aUserEmail, $aUserPhone, $aCampName, $aCampDescription, $aCampConstruction, $aCampParticipants, $aCampShortDesc, $aWorkshop1, $aWorkshop2, $aWorkshop3, $aWorkshop4)
 {
     $instance = new self();
     $instance->fill($aUserLogin, $aUserFirstName, $aUserLastName, $aUserEmail, $aUserPhone, $aCampName, $aCampDescription, $aCampConstruction, $aCampParticipants, $aCampShortDesc, $aWorkshop1, $aWorkshop2, $aWorkshop3, $aWorkshop4);
     return $instance;
 }
開發者ID:0dp,項目名稱:dreamcity,代碼行數:6,代碼來源:class.camp.php

示例13: opacity

 /**
  * Set opacity of current image
  *
  * @param  integer $transparency
  * @return Image
  */
 public function opacity($transparency)
 {
     if ($transparency >= 0 && $transparency <= 100) {
         $transparency = intval($transparency) / 100;
     } else {
         throw new Exception('Opacity must be between 0 and 100');
     }
     // create alpha mask
     $alpha = new self(null, $this->width, $this->height);
     $alpha->fill(sprintf('rgba(0, 0, 0, %.1f)', $transparency));
     // apply alpha mask
     $this->mask($alpha, true);
     return $this;
 }
開發者ID:rosskmurphy,項目名稱:Laravel-4-login-registration,代碼行數:20,代碼來源:Image.php

示例14: loadById

    /**
     * Load an item by its id.
     *
     * @param integer $id
     *
     * @return \self
     */
    public static function loadById($id)
    {
        $sql = '
			SELECT
				`itemId`,
				`name`,
				`itemType`,
				`price`,
				`twoHanded`,
				`improvisational`,
				`privileged`,
				`hitPointsDice`,
				`hitPointsDiceType`,
				`hitPoints`,
				`damageType`,
				`breakFactor`,
				`initiative`,
				`weaponModificator`,
				`weight`,
				`physicalStrengthRequirement`
			FROM items
			WHERE `itemId` = ' . \sqlval($id) . '
				AND !deleted
		';
        $item = query($sql);
        $obj = new self();
        $obj->fill($item);
        return $obj;
    }
開發者ID:friend8,項目名稱:DSA-Blacksmith,代碼行數:36,代碼來源:Item.php

示例15: instantiate

 public static function instantiate(array $data)
 {
     $instance = new self();
     $instance->fill($data)->save();
     return $instance;
 }
開發者ID:gez-studio,項目名稱:gez-mall,代碼行數:6,代碼來源:Tag.php


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