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


PHP self::setId方法代码示例

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


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

示例1: getById

 /**
  * @param integer $id
  * @return WebsiteSetting
  */
 public static function getById($id)
 {
     $setting = new self();
     $setting->setId(intval($id));
     $setting->getDao()->getById();
     return $setting;
 }
开发者ID:solverat,项目名称:pimcore,代码行数:11,代码来源:WebsiteSetting.php

示例2: getById

 /**
  * @param integer $id
  * @return Redirect
  */
 public static function getById($id)
 {
     $redirect = new self();
     $redirect->setId(intval($id));
     $redirect->getDao()->getById();
     return $redirect;
 }
开发者ID:solverat,项目名称:pimcore,代码行数:11,代码来源:Redirect.php

示例3: getById

 /**
  * Static helper to retrieve an instance of Document_DocType by the given ID
  *
  * @param integer $id
  * @return Document_DocType
  */
 public static function getById($id)
 {
     $docType = new self();
     $docType->setId(intval($id));
     $docType->getResource()->getById();
     return $docType;
 }
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:13,代码来源:DocType.php

示例4: getFromId

 public static function getFromId($id)
 {
     $db = Neuron_DB_Database::getInstance();
     $id = intval($id);
     $d = $db->query("\n\t\t\tSELECT\n\t\t\t\t*,\n\t\t\t\tUNIX_TIMESTAMP(er_date) AS datum\n\t\t\tFROM\n\t\t\t\teffect_report\n\t\t\tWHERE\n\t\t\t\ter_id = {$id}\n\t\t");
     if (count($d) > 0) {
         $village = Dolumar_Registry_Village::getInstance()->get($d[0]['er_vid']);
         $classname = 'Dolumar_Report_' . $d[0]['er_type'];
         if (class_exists($classname)) {
             $report = new $classname($village);
         } else {
             $report = new self($village);
         }
         $report->setId($id);
         foreach (self::getObjectsFromLog($d[0]['er_data']) as $v) {
             $report->addItem($v);
         }
         $report->setDate($d[0]['datum']);
         if (isset($d[0]['er_target_v_id'])) {
             $report->setTarget(Dolumar_Registry_Village::getInstance()->get($d[0]['er_target_v_id']));
         }
         return $report;
     }
     return false;
 }
开发者ID:Toxicat,项目名称:dolumar,代码行数:25,代码来源:Report.php

示例5: getById

 /**
  * @param integer $id
  * @return Glossary
  */
 public static function getById($id)
 {
     $glossary = new self();
     $glossary->setId(intval($id));
     $glossary->getResource()->getById();
     return $glossary;
 }
开发者ID:yonetici,项目名称:pimcore-coreshop-demo,代码行数:11,代码来源:Glossary.php

示例6: getById

 /**
  * @param integer $id
  * @return self
  */
 public static function getById($id)
 {
     $metadata = new self();
     $metadata->setId($id);
     $metadata->getDao()->getById();
     return $metadata;
 }
开发者ID:sfie,项目名称:pimcore,代码行数:11,代码来源:Predefined.php

示例7: getById

 /**
  * @param integer $id
  * @return self
  */
 public static function getById($id)
 {
     $property = new self();
     $property->setId($id);
     $property->getDao()->getById();
     return $property;
 }
开发者ID:ChristophWurst,项目名称:pimcore,代码行数:11,代码来源:Predefined.php

示例8: createFromProduct

 /**
  * @param SyliusProduct $product
  * @param array         $options
  *
  * @return Product
  */
 public static function createFromProduct(SyliusProduct $product, array $options = null)
 {
     $options = array_merge(['list' => null, 'position' => null, 'quantity' => null, 'variant' => null], (array) $options);
     $price = $product->getPrice() / 100;
     $instance = new self();
     $instance->setId($product->getId())->setName($product->getName())->setPrice($price)->setQuantity($options['quantity'])->setList($options['list'])->setPosition($options['position'])->setVariant($options['variant']);
     return $instance;
 }
开发者ID:webburza,项目名称:sylius-google-ecommerce-bundle,代码行数:14,代码来源:Product.php

示例9: inicializar

 public static function inicializar($params)
 {
     $necesidad = new self();
     $necesidad->setId($params['id']);
     $necesidad->setDescripcion($params['descripcion']);
     $necesidad->setBaja($params['baja']);
     return $necesidad;
 }
开发者ID:RamiroAlvaro,项目名称:ProyectoDeSoftware,代码行数:8,代码来源:necesidad_entidad.php

示例10: factory

 /**
  * Factory
  */
 public function factory($values)
 {
     // Get the pages from the database
     $pages = Page::findAllByChapter($values['id']);
     $chapter = new self($values['number'], $values['name'], $pages);
     $chapter->setId($values['id']);
     return $chapter;
 }
开发者ID:rmill,项目名称:cb-comic,代码行数:11,代码来源:Chapter.php

示例11: inicializar

 public static function inicializar($params)
 {
     $servicio = new self();
     $servicio->setId($params['id']);
     $servicio->setDescripcion($params['descripcion']);
     $servicio->setBaja($params['baja']);
     return $servicio;
 }
开发者ID:RamiroAlvaro,项目名称:ProyectoDeSoftware,代码行数:8,代码来源:servicio_prestado.php

示例12: initWithArray

 public static function initWithArray($array)
 {
     $instance = new self(NULL, NULL, NULL);
     $instance->setName($array[EventCategory::EVENTCATEGORY_NAME]);
     $instance->setId($array[EventCategory::EVENTCATEGORY_ID]);
     $instance->setPar_cat($array[EventCategory::EVENTCATEGORY_PAR_CAT]);
     return $instance;
 }
开发者ID:anasanzari,项目名称:tathva-organizer,代码行数:8,代码来源:EventCategory.php

示例13: inicializar

 public static function inicializar($params)
 {
     $configuracion = new self();
     $configuracion->setId($params['id']);
     $configuracion->setClave($params['clave']);
     $configuracion->setValor($params['valor']);
     $configuracion->setBaja($params['baja']);
     return $configuracion;
 }
开发者ID:RamiroAlvaro,项目名称:ProyectoDeSoftware,代码行数:9,代码来源:configuracion.php

示例14: mschapv2

 /**
  * Helper function for sending an MSCHAP v2 packet encapsulated in an EAP packet
  *
  * @param \Dapphp\Radius\MsChapV2Packet $chapPacket The MSCHAP v2 packet to send
  * @param int $id  The CHAP packet identifier (random if omitted)
  * @return string An EAP-MSCHAPv2 packet
  */
 public static function mschapv2(\Dapphp\Radius\MsChapV2Packet $chapPacket, $id = null)
 {
     $packet = new self();
     $packet->setId($id);
     $packet->code = self::CODE_RESPONSE;
     $packet->type = self::TYPE_EAP_MS_AUTH;
     $packet->data = $chapPacket->__toString();
     return $packet->__toString();
 }
开发者ID:dapphp,项目名称:radius,代码行数:16,代码来源:EAPPacket.php

示例15: create

 /**
  * @param array $params
  * @return Speaker
  */
 public static function create(array $params = []) : SpeakerInterface
 {
     if (empty($params)) {
         return new NullSpeaker();
     }
     $class = new self($params['first_name'], $params['last_name'], new Email($params['email']), new Twitter($params['twitter']), $params['avatar']);
     $class->setId($params['id']);
     return $class;
 }
开发者ID:phpminds,项目名称:website,代码行数:13,代码来源:Speaker.php


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