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


PHP Entity::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($markup)
 {
     parent::__construct("");
     $this->markup = $markup;
     $this->validator(NULL);
     // Can't really validate this.
 }
开发者ID:FatBoyXPC,项目名称:worldcubeassociation.org,代码行数:7,代码来源:Markup.class.php

示例2: __construct

 public function __construct($database, $name)
 {
     parent::__construct($database, $name);
     $this->setPresentation("n_sedie");
     $this->addField("n_sedie", INT, 11, MANDATORY);
     $this->addField("stato", VARCHAR, 1);
 }
开发者ID:patriziopezzilli,项目名称:Fusion,代码行数:7,代码来源:entityGestionetavoli.php

示例3: basename

 /**
  * @param Entity $entity_1
  * @param Entity $entity_2
  * @param string $name
  * @property $name nome della tabella sul db
  * @param null $roleName1
  * @param null $roleName2
  */
 function __construct($entity_1, $entity_2, $name = "", $roleName1 = null, $roleName2 = null)
 {
     $this->entity_1 = $entity_1;
     $this->entity_2 = $entity_2;
     if (!$this->entity_1->name) {
         echo Message::getInstance()->getMessage(MSG_ERROR_UNKNOWN_ENTITY) . " (" . basename(__FILE__) . ":" . __LINE__ . ")";
         exit;
     }
     if (isset($roleName1)) {
         $this->roleName1 = $roleName1;
     } else {
         $this->roleName1 = $this->entity_1->fields[0]->name . "_" . $this->entity_1->entityName;
     }
     if (isset($roleName2)) {
         $this->roleName2 = $roleName2;
     } else {
         $this->roleName2 = $this->entity_2->fields[0]->name . "_" . $this->entity_2->entityName;
     }
     if ($name != "") {
         parent::__construct(DB::getInstance(), "{$name}");
     } else {
         parent::__construct(DB::getInstance(), "{$this->entity_1->entityName}_{$this->entity_2->entityName}");
     }
     /**
      *
      *Relations do not have any primary key.
      *
      */
     $this->addReference($this->entity_1, $this->roleName1);
     $this->addReference($this->entity_2, $this->roleName2);
 }
开发者ID:patriziopezzilli,项目名称:Fusion,代码行数:39,代码来源:Relation.php

示例4: array

 function __construct($datas = array())
 {
     $this->tableName = 'possibilities';
     $this->databaseFields = array('idea', 'name', 'code');
     parent::__construct($datas);
     $this->votes = Database::getAll('votes', array('possibility' => $this->id));
 }
开发者ID:xdidx,项目名称:demago-webservices,代码行数:7,代码来源:Possibility.php

示例5: __construct

 public function __construct(ClassName $class, Identity $id, Repository $repository, Factory $factory, Alias $alias, RelationshipType $type, RelationshipEdge $startNode, RelationshipEdge $endNode)
 {
     parent::__construct($class, $id, $repository, $factory, $alias);
     $this->type = $type;
     $this->startNode = $startNode;
     $this->endNode = $endNode;
 }
开发者ID:innmind,项目名称:neo4j-onm,代码行数:7,代码来源:Relationship.php

示例6: __construct

 public function __construct($aParam = null)
 {
     parent::__construct($aParam);
     if ($sName = $this->GetName()) {
         // задается идентификатор виджета
         $this->_checkId();
     }
     if (is_null($this->GetPriority())) {
         $this->SetPriority(0);
     }
     if ($this->GetId()) {
         $aCfgData = Config::Get('widget.' . $this->GetId() . '.config');
         if ($aCfgData) {
             $aCfgData = F::Array_Merge($this->getAllProps(), $aCfgData);
             $this->setProps($aCfgData);
         }
     }
     if ($sName && is_null($this->getType())) {
         $aTypeData = E::ModuleViewer()->DefineWidgetType($sName, $this->GetDir(), $this->GetPluginId());
         if (isset($aTypeData['type'])) {
             $this->setType($aTypeData['type']);
             if ($aTypeData['type'] == 'template' && !empty($aTypeData['name'])) {
                 $this->setTemplate($aTypeData['name']);
                 $this->setName($aTypeData['name']);
             }
             /* LS-compatible */
             if (!$this->getParam('plugin') && $this->getPluginId()) {
                 $this->setParam('plugin', $this->getPluginId());
             }
         }
     }
 }
开发者ID:ZeoNish,项目名称:altocms,代码行数:32,代码来源:Widget.entity.class.php

示例7: __construct

 public function __construct($str_SessionID)
 {
     // Sets entity reference code
     $this->entityCode = 'activity';
     // Call parent constructor
     parent::__construct($str_SessionID);
 }
开发者ID:steromano87,项目名称:Gawain,代码行数:7,代码来源:Activity.php

示例8: __construct

 public function __construct($id, $name, $location, $beehives)
 {
     parent::__construct($id);
     $this->_name = $name;
     $this->_location = $location;
     $this->_beehives = $beehives;
 }
开发者ID:leloulight,项目名称:didapi,代码行数:7,代码来源:apiary.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->fields = array($this->idField, new Field(static::DESCRIPTION_FLD, TextType(), true), new Field(static::HEAD_FLD, StrType(100), true, 'Инициатор', array(Validate::IS_NUMERIC, Validate::IS_NOT_EMPTY)), new Field(static::OWNER_FLD, IntType(), false, 'Инициатор', array(Validate::IS_NUMERIC, Validate::IS_NOT_EMPTY)), new Field(static::TYPE_FLD, IntType(), true, 'Вид события', array(Validate::IS_NUMERIC, Validate::IS_NOT_EMPTY)), new Field(static::CREATION_DATE_FLD, TimestampType(), true, 'Время создания', array(Validate::IS_NOT_EMPTY)), new Field(static::DELETION_DATE_FLD, TimestampType()), new Field(static::UPDATED_DATE_FLD, TimestampType()), new Field(static::DUE_DATE_FLD, TimestampType(), true), new Field(static::PLACE_FLD, IntType(), true, 'Место', array(Validate::IS_NOT_EMPTY)));
     $this->dueDateKey = $this->ToPrfxNm(static::DUE_DATE_FLD);
     $this->createDateKey = $this->ToPrfxNm(static::CREATION_DATE_FLD);
 }
开发者ID:koninka,项目名称:Hackathon,代码行数:7,代码来源:class.Event.php

示例10: __construct

 public function __construct($input = null)
 {
     parent::__construct($input);
     if (!empty($this->suppressedContact)) {
         $this->suppressedContact = new Contact($this->suppressedContact);
     }
 }
开发者ID:leewillis77,项目名称:dotmailer-api,代码行数:7,代码来源:SuppressedContact.php

示例11: __construct

 public function __construct($database, $name)
 {
     parent::__construct($database, $name);
     $this->setPresentation("name");
     $this->addField("name", VARCHAR, 50);
     $this->addField("description", TEXT);
 }
开发者ID:patriziopezzilli,项目名称:Fusion,代码行数:7,代码来源:entityGroup.php

示例12: __construct

 /**
  * Определяем дополнительные правила валидации
  *
  * @param array
  */
 public function __construct($aParam = false)
 {
     if (Config::Get('module.user.captcha_use_registration')) {
         $this->aValidateRules[] = array('captcha', 'captcha', 'on' => array('registration'));
     }
     parent::__construct($aParam);
 }
开发者ID:cbrspc,项目名称:LIVESTREET-1-DISTRIB,代码行数:12,代码来源:User.entity.class.php

示例13: __construct

 public function __construct(\WebPay\WebPay $client, array $data)
 {
     if (array_key_exists('data', $data) && !empty($data['data'])) {
         $data['data'] = new EventData($client, $data['data']);
     }
     parent::__construct($client, $data);
 }
开发者ID:jphacks,项目名称:KB_10,代码行数:7,代码来源:Event.php

示例14: __construct

 public function __construct()
 {
     $this->type = "User";
     $this->url = $this->getURL();
     $this->avatar = $this->icon();
     parent::__construct();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:User.php

示例15: __construct

 public function __construct($database, $name, $owner = "")
 {
     parent::__construct($database, $name, WITH_OWNER);
     $this->addField("filename", VARCHAR, 255, MANDATORY);
     $this->addField("size", INT, 5);
     $this->addField("filetype", VARCHAR, 255, MANDATORY);
 }
开发者ID:patriziopezzilli,项目名称:Fusion,代码行数:7,代码来源:entityFileToFolder.php


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