CWIS Developer Documentation
Home
Main Page
Namespaces
Classes
Files
File List
File Members
objects
ControlledNameFactory.php
Go to the documentation of this file.
1
<?
PHP
2
3
#
4
# FILE: ControlledNameFactory.php
5
#
6
# Part of the Collection Workflow Integration System
7
# Copyright 2011 Edward Almasy and Internet Scout
8
# http://scout.wisc.edu
9
#
10
14
class
ControlledNameFactory
extends
ItemFactory
{
15
16
# ---- PUBLIC INTERFACE --------------------------------------------------
17
18
function
ControlledNameFactory
(
$FieldId
= NULL)
19
{
20
# set up item factory base class
21
$this->
ItemFactory
(
"ControlledName"
,
"ControlledNames"
,
"ControlledNameId"
,
"ControlledName"
,
$FieldId
);
22
}
23
29
function
GetUsageCount
()
30
{
31
return
$this->DB->Query(
"SELECT COUNT(DISTINCT RNI.ResourceId) AS ResourceCount"
32
.
" FROM ResourceNameInts RNI, ControlledNames CN"
33
.
" WHERE CN.FieldId = "
.intval($this->FieldId)
34
.
" AND RNI.ControlledNameId = CN.ControlledNameId"
35
.
" AND RNI.ResourceId >= 0"
,
36
"ResourceCount"
);
37
}
38
39
40
# ---- PRIVATE INTERFACE -------------------------------------------------
41
42
}
43
44
45
?>
Copyright 2012 Internet Scout