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


PHP SMWDIProperty::isShown方法代码示例

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


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

示例1: unstubProperty

 /**
  * Unstub a single property from the stub data array. If available, an
  * existing object for that property might be provided, so we do not
  * need to make a new one. It is not checked if the object matches the
  * property name.
  *
  * @param $propertyKey string
  * @param $diProperty SMWDIProperty
  */
 protected function unstubProperty($propertyKey, $diProperty = null)
 {
     if (!array_key_exists($propertyKey, $this->mProperties)) {
         if (is_null($diProperty)) {
             //$propertyDV = SMWPropertyValue::makeProperty( $propertyKey );
             //$diProperty = $propertyDV->getDataItem();
             $diProperty = new SMWDIProperty($propertyKey, false);
         }
         $this->mProperties[$propertyKey] = $diProperty;
         if (!$diProperty->isUserDefined()) {
             if ($diProperty->isShown()) {
                 $this->mHasVisibleSpecs = true;
                 $this->mHasVisibleProps = true;
             }
         } else {
             $this->mHasVisibleProps = true;
         }
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:28,代码来源:SMW_SqlStubSemanticData.php

示例2: addPropertyObjectValue

 /**
  * Store a value for a property identified by its SMWDataItem object.
  *
  * @note There is no check whether the type of the given data item
  * agrees with the type of the property. Since property types can
  * change, all parts of SMW are prepared to handle mismatched data item
  * types anyway.
  *
  * @param $property SMWDIProperty
  * @param $dataItem SMWDataItem
  */
 public function addPropertyObjectValue(SMWDIProperty $property, SMWDataItem $dataItem)
 {
     if ($dataItem instanceof SMWDIContainer) {
         $this->addSubSemanticData($dataItem->getSemanticData());
         $dataItem = $dataItem->getSemanticData()->getSubject();
     }
     if ($property->isInverse()) {
         // inverse properties cannot be used for annotation
         return;
     }
     if (!array_key_exists($property->getKey(), $this->mPropVals)) {
         $this->mPropVals[$property->getKey()] = array();
         $this->mProperties[$property->getKey()] = $property;
     }
     if ($this->mNoDuplicates) {
         $this->mPropVals[$property->getKey()][$dataItem->getHash()] = $dataItem;
     } else {
         $this->mPropVals[$property->getKey()][] = $dataItem;
     }
     if (!$property->isUserDefined()) {
         if ($property->isShown()) {
             $this->mHasVisibleSpecs = true;
             $this->mHasVisibleProps = true;
         }
     } else {
         $this->mHasVisibleProps = true;
     }
 }
开发者ID:yusufchang,项目名称:app,代码行数:39,代码来源:SMW_SemanticData.php

示例3: unstubProperty

 /**
  * Unstub a single property from the stub data array. If available, an
  * existing object for that property might be provided, so we do not
  * need to make a new one. It is not checked if the object matches the
  * property name.
  *
  * @since 1.8
  *
  * @param string $propertyKey
  * @param SMWDIProperty $diProperty if available
  * @throws SMWDataItemException if property key is not valid
  * 	and $diProperty is null
  */
 protected function unstubProperty($propertyKey, $diProperty = null)
 {
     if (!array_key_exists($propertyKey, $this->mProperties)) {
         if (is_null($diProperty)) {
             $diProperty = new SMWDIProperty($propertyKey, false);
         }
         $this->mProperties[$propertyKey] = $diProperty;
         if (!$diProperty->isUserDefined()) {
             if ($diProperty->isShown()) {
                 $this->mHasVisibleSpecs = true;
                 $this->mHasVisibleProps = true;
             }
         } else {
             $this->mHasVisibleProps = true;
         }
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:30,代码来源:SMW_Sql3StubSemanticData.php


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