本文整理汇总了PHP中SMWPropertyValue::getWikiValue方法的典型用法代码示例。如果您正苦于以下问题:PHP SMWPropertyValue::getWikiValue方法的具体用法?PHP SMWPropertyValue::getWikiValue怎么用?PHP SMWPropertyValue::getWikiValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMWPropertyValue
的用法示例。
在下文中一共展示了SMWPropertyValue::getWikiValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newPropertyPrintRequest
/**
* @since 2.1
*
* @param DIProperty $property
*
* @return PrintRequest
*/
public function newPropertyPrintRequest(DIProperty $property)
{
$propertyValue = new PropertyValue('__pro');
$propertyValue->setDataItem($property);
$instance = new PrintRequest(PrintRequest::PRINT_PROP, $propertyValue->getWikiValue(), $propertyValue);
return $instance;
}
示例2: initialize
/**
* @since 2.1
*/
public function initialize()
{
$params = explode('/', $this->queryString);
reset($params);
// Remove empty elements
$params = array_filter($params, 'strlen');
$property = isset($this->requestOptions['property']) ? $this->requestOptions['property'] : current($params);
$value = isset($this->requestOptions['value']) ? $this->requestOptions['value'] : next($params);
$property = $this->urlEncoder->decode($property);
$value = str_replace(array('-25'), array('%'), $value);
$this->property = PropertyValue::makeUserProperty($property);
if (!$this->property->isValid()) {
$this->propertyString = $property;
$this->value = null;
$this->valueString = $value;
} else {
$this->propertyString = $this->property->getWikiValue();
$this->value = DataValueFactory::getInstance()->newPropertyObjectValue($this->property->getDataItem(), $this->urlEncoder->decode($value));
$this->valueString = $this->value->isValid() ? $this->value->getWikiValue() : $value;
}
$this->setLimit();
$this->setOffset();
$this->setNearbySearch();
}
示例3: getWikiValue
/**
* @see DataValue::getWikiValue
*/
public function getWikiValue()
{
return $this->lastPropertyChainValue !== null ? $this->lastPropertyChainValue->getWikiValue() : '';
}
示例4: getPropertyLabel
/**
* Figures out the label of the property to be used. For outgoing ones it is just
* the text, for incoming ones we try to figure out the inverse one if needed,
* either by looking for an explicitly stated one or by creating a default one.
*
* @param[in] $property SMWPropertyValue The property of interest
* @param[in] $incoming bool If it is an incoming property
*
* @return string The label of the property
*/
private function getPropertyLabel(\SMWPropertyValue $property, $incoming = false)
{
if ($incoming && $this->getOption('showInverse')) {
$oppositeprop = \SMWPropertyValue::makeUserProperty(wfMessage('smw_inverse_label_property')->text());
$labelarray = $this->store->getPropertyValues($property->getDataItem()->getDiWikiPage(), $oppositeprop->getDataItem());
$rv = count($labelarray) > 0 ? $labelarray[0]->getLongWikiText() : wfMessage('smw_inverse_label_default', $property->getWikiValue())->text();
} else {
$rv = $property->getWikiValue();
}
return $this->unbreak($rv);
}
示例5: getPropertyLabel
/**
* Figures out the label of the property to be used. For outgoing ones it is just
* the text, for incoming ones we try to figure out the inverse one if needed,
* either by looking for an explicitly stated one or by creating a default one.
*
* @param[in] $property SMWPropertyValue The property of interest
* @param[in] $incoming bool If it is an incoming property
*
* @return string The label of the property
*/
private function getPropertyLabel( SMWPropertyValue $property, $incoming = false ) {
global $smwgBrowseShowInverse;
if ( $incoming && $smwgBrowseShowInverse ) {
$oppositeprop = SMWPropertyValue::makeUserProperty( wfMsg( 'smw_inverse_label_property' ) );
$labelarray = &smwfGetStore()->getPropertyValues( $property->getDataItem()->getDiWikiPage(), $oppositeprop->getDataItem() );
$rv = ( count( $labelarray ) > 0 ) ? $labelarray[0]->getLongWikiText():
wfMsg( 'smw_inverse_label_default', $property->getWikiValue() );
} else {
$rv = $property->getWikiValue();
}
return $this->unbreak( $rv );
}
示例6: addPropertyValue
/**
* Adds a single property value pair to the data. value may be null.
*
* @param SMWPropertyValue $property
* @param SMWDataValue $value
*/
public function addPropertyValue( SMWPropertyValue $property, SMWDataValue $value ) {
$this->addPropertynameValue( $property->getWikiValue(), $value );
}