本文整理汇总了PHP中Zend_Service_WindowsAzure_Storage_TableEntity类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Service_WindowsAzure_Storage_TableEntity类的具体用法?PHP Zend_Service_WindowsAzure_Storage_TableEntity怎么用?PHP Zend_Service_WindowsAzure_Storage_TableEntity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Service_WindowsAzure_Storage_TableEntity类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _resolveAttributes
/**
* Resolve table values to attributes
*
* @param Zend_Service_WindowsAzure_Storage_TableEntity $entity
* @return array
*/
protected function _resolveAttributes(Zend_Service_WindowsAzure_Storage_TableEntity $entity)
{
$result = array();
foreach ($entity->getAzureValues() as $attr) {
$result[$attr->Name] = $attr->Value;
}
return $result;
}
开发者ID:aldimol,项目名称:zf-sample,代码行数:14,代码来源:WindowsAzure.php
示例2: _generateAzureRepresentation
/**
* Generate Azure representation from entity (creates atompub markup from properties)
*
* @param Zend_Service_WindowsAzure_Storage_TableEntity $entity
* @return string
*/
protected function _generateAzureRepresentation(Zend_Service_WindowsAzure_Storage_TableEntity $entity = null)
{
// Generate Azure representation from entity
$azureRepresentation = array();
$azureValues = $entity->getAzureValues();
foreach ($azureValues as $azureValue) {
$value = array();
$value[] = '<d:' . $azureValue->Name;
if ($azureValue->Type != '') {
$value[] = ' m:type="' . $azureValue->Type . '"';
}
if (is_null($azureValue->Value)) {
$value[] = ' m:null="true"';
}
$value[] = '>';
if (!is_null($azureValue->Value)) {
if (strtolower($azureValue->Type) == 'edm.boolean') {
$value[] = $azureValue->Value == true ? '1' : '0';
} else {
if (strtolower($azureValue->Type) == 'edm.datetime') {
$value[] = $this->_convertToEdmDateTime($azureValue->Value);
} else {
$value[] = htmlspecialchars($azureValue->Value);
}
}
}
$value[] = '</d:' . $azureValue->Name . '>';
$azureRepresentation[] = implode('', $value);
}
return implode('', $azureRepresentation);
}
开发者ID:bartolomeu,项目名称:estoque_gusella,代码行数:37,代码来源:Table.php
示例3: setAzureValues
/**
* Set Azure values
*
* @param array $values
* @param boolean $throwOnError Throw Zend_Service_WindowsAzure_Exception when a property is not specified in $values?
* @throws Zend_Service_WindowsAzure_Exception
*/
public function setAzureValues($values = array(), $throwOnError = false)
{
// Set parent values
parent::setAzureValues($values, false);
// Set current values
foreach ($values as $key => $value) {
$this->{$key} = $value;
}
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:16,代码来源:DynamicTableEntity.php
注:本文中的Zend_Service_WindowsAzure_Storage_TableEntity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论