当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveRecordModel::getNewInstance方法代码示例

本文整理汇总了PHP中ActiveRecordModel::getNewInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecordModel::getNewInstance方法的具体用法?PHP ActiveRecordModel::getNewInstance怎么用?PHP ActiveRecordModel::getNewInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ActiveRecordModel的用法示例。


在下文中一共展示了ActiveRecordModel::getNewInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getNewInstance

 public static function getNewInstance(ProductList $productList, Product $product)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->productList->set($productList);
     $instance->product->set($product);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:ProductListItem.php

示例2: getNewInstance

 public static function getNewInstance(OrderedItem $item, ProductFile $file)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->orderedItem->set($item);
     $instance->productFile->set($file);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:OrderedFile.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     ActiveRecordModel::executeUpdate('DELETE FROM ClonedStore');
     $this->usd = ActiveRecordModel::getNewInstance('Currency');
     $this->usd->setID('ZZZ');
     $this->usd->save(ActiveRecord::PERFORM_INSERT);
     @unlink(ClonedStoreUpdater::getTimestampFile());
     @unlink(ClonedStoreUpdater::getIDFile());
     // create stores
     for ($k = 0; $k <= 0; $k++) {
         $this->stores[$k] = ClonedStore::getNewInstance();
         $this->stores[$k]->domain->set($k);
         $this->stores[$k]->save();
         echo $this->stores[$k]->lastImport->get();
     }
     // create categories
     $root = Category::getRootNode();
     for ($k = 0; $k <= 5; $k++) {
         $this->categories[] = $this->createCategory($root, $k);
     }
     $this->categories['1.1'] = $this->createCategory($this->categories[1], '1.1');
     $this->categories['1.2'] = $this->createCategory($this->categories[1], '1.2');
     $this->categories['1.2.1'] = $this->createCategory($this->categories['1.2'], '1.2.1');
     $this->categories['1.2.2'] = $this->createCategory($this->categories['1.2'], '1.2.2');
     usleep(1500000);
 }
开发者ID:saiber,项目名称:www,代码行数:27,代码来源:TestStoreCloning.php

示例4: getNewInstance

 public static function getNewInstance(OrderedItem $item, ProductOptionChoice $choice)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->orderedItem->set($item);
     $instance->choice->set($choice);
     return $instance;
 }
开发者ID:GregerA,项目名称:livecart,代码行数:7,代码来源:OrderedItemOption.php

示例5: getNewInstance

 public static function getNewInstance($className, User $user, UserAddress $userAddress)
 {
     $instance = parent::getNewInstance($className);
     $instance->user->set($user);
     $instance->userAddress->set($userAddress);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:UserAddressType.php

示例6: getNewInstance

 public static function getNewInstance(CustomerOrder $order, $code)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->order->set($order);
     $instance->couponCode->set($code);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:OrderCoupon.php

示例7: getNewInstance

 public static function getNewInstance($keywords, $ipAddress)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->keywords->set($keywords);
     $instance->ip->set(ip2long($ipAddress));
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:SearchLog.php

示例8: getNewInstance

 public static function getNewInstance(CustomerOrder $order, User $user)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->order->set($order);
     $instance->user->set($user);
     return $instance;
 }
开发者ID:saiber,项目名称:www,代码行数:7,代码来源:OrderNote.php

示例9: getInstanceByIdentifier

 public static function getInstanceByIdentifier($stringIdentifier)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->classID->set(0);
     $instance->setStringIdentifier($stringIdentifier);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:EavObject.php

示例10: getNewInstanceByUser

 public static function getNewInstanceByUser(NewsletterMessage $message, User $user)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->message->set($message);
     $instance->user->set($user);
     return $instance;
 }
开发者ID:saiber,项目名称:www,代码行数:7,代码来源:NewsletterSentMessage.php

示例11: getNewInstance

 /**
  * Create new campaign
  */
 public static function getNewInstance(Category $category, ClonedStore $store)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->category->set($category);
     $instance->store->set($store);
     return $instance;
 }
开发者ID:saiber,项目名称:www,代码行数:10,代码来源:ClonedStoreCategory.php

示例12: getNewInstance

 public static function getNewInstance(Product $product, ProductVariation $variation)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->product->set($product);
     $instance->variation->set($variation);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:ProductVariationValue.php

示例13: getNewInstance

 public static function getNewInstance(DiscountCondition $condition, $className = 'RuleActionPercentageDiscount')
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->condition->set($condition);
     $instance->actionClass->set($className);
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:7,代码来源:DiscountAction.php

示例14: getNewInstance

 public static function getNewInstance(Category $category, Category $relatedCategory)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->category->set($category);
     $instance->relatedCategory->set($relatedCategory);
     return $instance;
 }
开发者ID:saiber,项目名称:www,代码行数:7,代码来源:CategoryRelationship.php

示例15: getNewInstance

 /**
  * Create new advertiser
  */
 public static function getNewInstance(ClonedStore $store, $type)
 {
     $instance = parent::getNewInstance(__CLASS__);
     $instance->store->set($store);
     $instance->type->set($type);
     return $instance;
 }
开发者ID:saiber,项目名称:www,代码行数:10,代码来源:ClonedStoreRule.php


注:本文中的ActiveRecordModel::getNewInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。