CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

MetadataFieldGroup.php
Go to the documentation of this file.
1 <?PHP
2 #
3 # FILE: MetadataFieldGroup.php
4 #
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2012-2016 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis/
8 #
9
14 class MetadataFieldGroup extends Folder
15 {
16
21 public function GetFields()
22 {
23 $ItemIds = $this->GetItemIds();
24 $Items = array();
25
26 foreach ($ItemIds as $Info)
27 {
28 try
29 {
30 $Items[] = new $Info["Type"]($Info["ID"]);
31 }
32
33 # skip invalid fields
34 catch (InvalidArgumentException $Exception)
35 {
36 continue;
37 }
38 }
39
40 return $Items;
41 }
42
47 public function GetFieldCount()
48 {
49 if (!isset($this->FieldCount))
50 {
51 $this->FieldCount = count($this->GetItemIds());
52 }
53
54 return $this->FieldCount;
55 }
56
60 protected $FieldCount;
61 }
62
MetadataFieldGroup\GetFieldCount
GetFieldCount()
Get the number of metadata fields this group holds.
Definition: MetadataFieldGroup.php:47
MetadataFieldGroup
Class that builds on the foldering functionality to provide groups of metadata fields.
Definition: MetadataFieldGroup.php:14
Folder
Folder object used to create and manage groups of items.
Definition: Folder.php:17
PHP
PHP
Definition: RSSClient--Test.php:12
MetadataFieldGroup\$FieldCount
$FieldCount
The number of metadata fields the group contains.
Definition: MetadataFieldGroup.php:60
MetadataFieldGroup\GetFields
GetFields()
Get the items of the metadata field group as objects instead of IDs.
Definition: MetadataFieldGroup.php:21
Folder\GetItemIds
GetItemIds($Offset=NULL, $Length=NULL)
Retrieve array of IDs of items in folder, in the order that they appear in the folder.
Definition: Folder.php:322
$Items
$Items
Definition: RSSClient--Test.php:26