本文整理匯總了PHP中FileModel::fetchAllProperties方法的典型用法代碼示例。如果您正苦於以下問題:PHP FileModel::fetchAllProperties方法的具體用法?PHP FileModel::fetchAllProperties怎麽用?PHP FileModel::fetchAllProperties使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FileModel
的用法示例。
在下文中一共展示了FileModel::fetchAllProperties方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testInstanceIDIsNullWhenNotAvailable
public function testInstanceIDIsNullWhenNotAvailable()
{
$properties = array('filename' => 'sample.pdf', 'mime' => 'application/pdf');
$files = new FileModel(new NoInstanceFoo());
$id = $files->storeFilename(TEST_PATH . '/fixtures/sample.pdf', $properties);
$properties = $files->fetchAllProperties();
foreach ($properties as $propertySet) {
$this->assertNull($propertySet['instanceID']);
}
}
示例2: fetchCompletedResponseSchema
/**
* Return the content of the Completed Response XML Schema associated with this questionnaire
*
* @return string XML Schema document
*/
public function fetchCompletedResponseSchema()
{
$fileModel = new FileModel($this);
$files = $fileModel->fetchAllProperties();
foreach ($files as $id => $properties) {
if ($properties['filename'] === 'completed-response-schema.xsd') {
return $fileModel->fetch($id);
}
}
throw new Exception('Completed response schema not found');
}
示例3: getAttachments
/**
* Return all attachments belonging to this question
*
* @return Array
*/
public function getAttachments()
{
$fileModel = new FileModel($this);
return $fileModel->fetchAllProperties();
}