Procedural File: filter_functions.php

Source Location: /php/filter_functions.php



Classes:

Page Details:

filter_functions.php

holds filter 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/>.

Tags:





buildFltaction

void buildFltaction( $filters, $qstr, array $filter)

[line 1505]

builds elements into a action search filter

Tags:

  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filters -
  • $qstr -

[ Top ]

buildFltatr

void buildFltatr( $filters, $qstr)

[line 556]

Parameters

  • $filters -
  • $qstr -

[ Top ]

buildFltftx

void buildFltftx( $filters, $qstr, array $filter)

[line 63]

builds elements into a free text search filter

Tags:

  • author - Guy Hunt
  • since - 0.5

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filters -
  • $qstr -

[ Top ]

buildFltkey

void buildFltkey( $filters, $qstr)

[line 279]

Parameters

  • $filters -
  • $qstr -

[ Top ]

buildFltPlace

array buildFltPlace( array $filters, array $qstr)

[line 953]

--- PLACE --- // buildFltPlace() To build the existing search filter into a self contained array This filter is used when you want to query against a place.

Tags:

  • return - the array containing the new filters. FALSE if there was an error.
  • since - 0.6
  • access - public

Parameters

  • array $filters - the existing array of filters
  • array $qstr - - the $_REQUEST array

[ Top ]

buildFltSpan

void buildFltSpan( $filters, $qstr, array $filter)

[line 1273]

builds elements into a span search filter

Tags:

  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filters -
  • $qstr -

[ Top ]

buildFltstecd

void buildFltstecd( $filters, $qstr, array $filter)

[line 741]

builds elements into a sitecode search filter

Tags:

  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filters -
  • $qstr -

[ Top ]

dispDelOp

string dispDelOp( string $filter_id)

[line 2047]

displays a delete link for filter builder functions

Tags:

  • return - a resolved XHTML string
  • author - Guy Hunt
  • since -

    0.4

    FIX ME: This function needs to be modified to remove the printing to screen

Parameters

  • string $filter_id - the id number of the filter

[ Top ]

dispFltaction

void dispFltaction( array $filter, $filter_id)

[line 1644]

displays a filter dialogue for action searches

Tags:

  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filter_id -

[ Top ]

dispFltatr

void dispFltatr( $filter, $filter_id)

[line 679]

Parameters

  • $filter -
  • $filter_id -

[ Top ]

dispFltftx

void dispFltftx( array $filter, $filter_id)

[line 242]

displays a filter dialogue for free text searches

Tags:

  • author - Guy Hunt
  • since - 0.5

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filter_id -

[ Top ]

dispFltkey

void dispFltkey( $filter, $filter_id)

[line 457]

Parameters

  • $filter -
  • $filter_id -

[ Top ]

dispFltPlace

void dispFltPlace( array $filter, int $filter_id)

[line 1176]

dispFltPlace() displays the place search filter dialogue.

Tags:

  • since - 0.6
  • access - public

Parameters

  • array $filter - an array of the filter vars
  • int $filter_id - the id of the filter

[ Top ]

dispFltSpan

void dispFltSpan( array $filter, $filter_id)

[line 1436]

displays a filter dialogue for Span searches

Tags:

  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filter_id -

[ Top ]

dispFltstecd

void dispFltstecd( array $filter, $filter_id)

[line 904]

displays a filter dialogue for Site Code searches

Tags:

  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • $filter_id -

[ Top ]

dispSaveOp

void dispSaveOp( $filter_id)

[line 2012]

Parameters

  • $filter_id -

[ Top ]

dispSetOperation

string dispSetOperation( string $filter_id)

[line 2075]

returns the set operation form elements filter builder functions

Tags:

  • return - a resolved XHTML string
  • author - Guy Hunt
  • author - Stuart Eve
  • since - 0.6

Parameters

  • string $filter_id - the id number of the filter

[ Top ]

edtFtr

void edtFtr( $filter, $type, $nname, $sgrp, $cre_by, $qtype)

[line 1948]

Parameters

  • $filter -
  • $type -
  • $nname -
  • $sgrp -
  • $cre_by -
  • $qtype -

[ Top ]

execFltaction

$array execFltaction( array $filter, [boolean $simple = FALSE])

[line 1561]

executes an action based filter

Tags:

  • return - an ARK standard results array
  • author - Stuart Eve
  • since -

    v0.6

    NOTE: $filter should contain: action - the action actor - the actor

Parameters

  • array $filter - the ARK standard settings for the filter
  • boolean $simple - a switch to allow a hits array to be returned raw

[ Top ]

execFltatr

void execFltatr( $filter, [ $simple = FALSE])

[line 606]

Parameters

  • $filter -
  • $simple -

[ Top ]

execFltftx

array execFltftx( array $filter, [boolean $simple = FALSE])

[line 105]

executes a free text search across the db

Tags:

  • return - a standard ARK results array
  • author - Guy Hunt
  • since - 0.5

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • boolean $simple - a switch to return the results as hits or ARK 'results_array'

[ Top ]

execFltkey

$array execFltkey( array $filter, [boolean $simple = FALSE])

[line 335]

executes an itemkey based filter

Tags:

  • return - an ARK standard results array
  • author - Guy Hunt
  • since -

    v0.4

    NOTE: $filter should contain: key - the module key either the id of the module or the 3 letter mod code type - the filter type (should be set to 'key')

Parameters

  • array $filter - the ARK standard settings for the filter
  • boolean $simple - a switch to allow a hits array to be returned raw

[ Top ]

execFltPlace

array execFltPlace( array $filter, [ $simple = FALSE], mapObj $map, array $mods)

[line 1014]

executes a place spatial filter

Tags:

  • return - the results array. FALSE if there was an error.
  • since - 0.6
  • access - public

Parameters

  • array $filter - an array of the filter vars
  • mapObj $map - the current map object
  • array $mods - this is an array of short mod codes for the modules containing spatial data
  • $simple -

[ Top ]

execFltSpan

array execFltSpan( array $filter, [boolean $simple = FALSE])

[line 1343]

executes a span search across the db

Tags:

  • return - a standard ARK results array
  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • boolean $simple - a switch to return the results as hits or ARK 'results_array'

[ Top ]

execFltstecd

array execFltstecd( array $filter, [boolean $simple = FALSE])

[line 783]

executes a site code search across the db

Tags:

  • return - a standard ARK results array
  • author - Stuart Eve
  • since - 0.6

Parameters

  • array $filter - an ARK standard filter array containing the required params
  • boolean $simple - a switch to return the results as hits or ARK 'results_array'

[ Top ]

filterUrl

void filterUrl( $filter)

[line 1987]

Parameters

  • $filter -

[ Top ]

getFtr

array getFtr( integer $id)

[line 1915]

returns a filter from the database

Tags:

  • return - an array containing the nickname of the filter
  • author - Guy Hunt
  • since - 0.6
  • access - public

Parameters

  • integer $id - the id of the filter

[ Top ]

prcsHits

array prcsHits( array $hits)

[line 1762]

processes hits into a properly formed results array

Tags:

  • return - the properly formed results_array.
  • author - Guy Hunt
  • author - Stuart Eve
  • since - 0.5.1
  • access - public

Parameters

  • array $hits - the hits array

[ Top ]

prcsHitsMod

array prcsHitsMod( array $hits, string $mod)

[line 1820]

processes hits into a properly formed results array limiting the results to a single mod

Tags:

  • return - the properly formed results_array.
  • author - Guy Hunt
  • author - Stuart Eve
  • since -

    0.5.1

    NOTE: This is NOT the preferred method. The correct method is to use two filters to achieve this result. This is a specialised function for the mini search

  • access - public

Parameters

  • array $hits - the hits array
  • string $mod - the mod to limit to

[ Top ]

resIntersect

array resIntersect( array $arr1, array $arr2)

[line 2102]

intersects results arrays in a similar way that the array_intersect() PHP function should

Tags:

  • return - the joined results array
  • author - Guy Hunt
  • since -

    0.4

    Note: Bear in mind that this function expects ARK standard results arrays not any old multidim array.

Parameters

  • array $arr1 - the first array
  • array $arr2 - the second array

[ Top ]

resIntersectSimple

array resIntersectSimple( array $arr1, array $arr2)

[line 2142]

intersects multidim arrays

Tags:

  • return - the intersected array
  • author - Guy Hunt
  • since -

    v0.5

    Note: Something similar to this should be available as a PHP native function from PHP5 onwards. Check to see if this is now obsolete

Parameters

  • array $arr1 - the first array
  • array $arr2 - the second array

[ Top ]

verAddFtr

void verAddFtr( $filters, $filter, $num_elements, $vtok)

[line 1712]

Parameters

  • $filters -
  • $filter -
  • $num_elements -
  • $vtok -

[ Top ]


Documentation generated on Thu, 26 Feb 2009 16:48:20 +0000 by phpDocumentor 1.4.1