当前位置: 首页>>代码示例>>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;未经允许,请勿转载。