Source Location: /php/get_functions.php
get_functions.php
holds get functions
PHP versions 4 and 5
LICENSE: ARK - The Archaeological Recording Kit. An open-source framework for displaying and working with archaeological data Copyright (C) 2008 L - P : Partnership Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
array getAction(
string $actorkey, string $actorvalue, [string $subjkey = FALSE], [string $subjvalue = FALSE])
[line 211]
gets the action(s) undertaken by an actor
[ Top ]
string getActionDate(
string $itemkey, string $itemvalue, mixed $datetype, string $datestyle)
[line 855]
returns an element of a date of an action
0.1
NOTE: in order to provide acces to a single record supply the id number into the itemvalue field and set the datetype to 'SINGLE'
[ Top ]
array getActor(
string $itemkey, string $itemvalue, [integer/string $actiontype = FALSE], [string $actorkey = FALSE])
[line 119]
returns an actor or actors involved in an action linked to an item
0.5.1
NOTE: actiontype can be the number or the nickname. FALSE will give you all of the actors associated with the record
[ Top ]
mixed getActorElem(
string $actor_id, string $elem, [string $actor_itemkey = FALSE], [string $elemclass = FALSE])
[line 276]
returns an element of an actor
[ Top ]
string getAlias(
string $tbl, string $lang, string $col, string $src_key, int $type)
[line 1321]
retrieves the alias of something in the database. uses a caching system whereby it caches to an array in the session
0.4
Alias types are:
[ Top ]
array getAllAliases(
string $tbl, string $col, string $src_key, int $type)
[line 1407]
retrieves all of the aliases of something in the database, regardless of language
0.6
Alias types are:
[ Top ]
array getAllFiles(
[string $mod = FALSE])
[line 464]
returns an array of all the files that are attached to items. Can be limited by mod
[ Top ]
array getAllItems(
string $mod)
[line 1760]
retrieves an array containing every item in ARK belonging to a specific mod
[ Top ]
string getAttr(
string $itemkey, string $itemvalue, mixed $attribute, string $element, [string $lang = FALSE])
[line 769]
returns an element of a specified attr
nb: use getCh to get a list of attrs if you want to go by attribute type
0.1
NOTE: this function is normally used to return an array containing elements of attributes of a particular type which are attached to an item by its key value pair. The function can handle numeric and textual references to the attribute type
[ Top ]
array getCh(
string $dclass, string $itemkey, string $itemvalue, [mixed $type = FALSE])
[line 512]
returns an array of frag id's of fragments chained to a record or fragment
0.6
NOTES: 1: Attribute must be handled in a different way as the types require join syntax 2: If type is not set, the function returns all downward links indiscriminately this is largely of use in deletion and will be used in the forthcoming getChFullDown()
[ Top ]
array getChData(
string $dclass, string $itemkey, string $itemvalue, mixed $type)
[line 605]
returns an array of fragments chained to a record or fragment
0.6
NOTE 1: Attribute must be handled in a different way as the types require join syntax
[ Top ]
void getChFullUp(
string $key, string $value)
[line 682]
reveals the structure of a chain of fragments. It uses the getChLinkUp function as a means to crawl up the chain until it hits an item. it returns an array containing the structure of the chain from this fragment up to the head.
[ Top ]
void getChLinkUp(
string $key, string $value)
[line 725]
retrieves a single fragment or item one link further up a data chain.
returns an array containing the key value pair of the link
[ Top ]
mixed getClassType(
string $dataclass, string $rawvar, string $mode)
[line 1075]
returns the class type (either the id number or the nickname)
[ Top ]
array getColumns(
object $db, string $db_name, string $table_name)
[line 1728]
retrieves an array of column names from a specified database and table
[ Top ]
integer getCxtType(
string $cxt_cd)
[line 1270]
returns a single cxttype
0.6
NOTE: Use getModType() instead
[ Top ]
array getFile(
string $itemkey, string $itemvalue)
[line 390]
returns an array of files
[ Top ]
array getFileName(
$filenr, string $itemkey, string $itemvalue)
[line 429]
returns an array of files
[ Top ]
string getMarkup(
string $tbl, string $lang, string $nname, [boolean $bool = FALSE])
[line 1585]
gets a single item of markup
[ Top ]
integer getModType(
string $mod_cd, string $mod, string $item)
[line 1017]
returns the modtype of an item
0.5.1
DEV NOTE: The first parameter seems to be redundant
[ Top ]
array getMulti(
string $tbl, string $where, [string $col = FALSE])
[line 1537]
gets multiple rows from the db
0.2
NB: the db call is faster if you specify a specific column. However this advantage is lost if you need to go back to the db more than once. Therefore getting all cols is faster than running this function twice
[ Top ]
float getNumber(
string $itemkey, string $itemvalue, mixed $numbertype)
[line 339]
returns a number
[ Top ]
void getRow(
string $tbl, [int $id = FALSE], [string $where = FALSE])
[line 1451]
returns a row from the given table in the format of a mysql_fetch_array()
0.3
if you use the optional id param any where clause is ignored and vice versa
[ Top ]
void getSingle(
string $col, string $tbl, string $where)
[line 1497]
gets a single value in a fairly abstracted way
[ Top ]
string getSingleText(
string $itemkey, string $itemvalue, integer/string $txttype, [string $lang = FALSE])
[line 56]
returns a single snippet of text
[ Top ]
array getSpan(
string $itemkey, string $itemvalue, mixed $spantype)
[line 1140]
returns the elements of a span
[ Top ]
mixed getSpanAttr(
integer $span_id, string $element, [integer $aliastype = NULL])
[line 1207]
returns an array of attributes of a span
[ Top ]
array getTables(
object $db, string $db_name)
[line 1690]
retrieves an array of table names from a specified database
[ Top ]
void getUserAttr(
user_id $user_id, element $element)
[line 1649]
gets information about a user
[ Top ]
array getXmi(
string $itemkey, string $itemvalue, [string $mod = FALSE])
[line 937]
returns an array of all the xmi links for a specified itemkey
[ Top ]