dbscript
[ class tree: dbscript ] [ index: dbscript ] [ all elements ]

Procedural File: _functions.php

Source Location: /_functions.php



Page Details:

dbscript for PHP 4 & 5 - restful crud framework



Tags:

license:  MIT License
filesource:  Source Code for this file
copyright:  Copyright 2007 Brian Hendrickson
link:  http://dbscript.net/
author:  Brian Hendrickson <brian@dbscript.net>
version:  0.1.2 -- 19-Feb-2007








after_filter [line 241]

void after_filter( string $name, string $func, [string $when = 'after'])

After Filter

set an aspect function to trigger after another function




Tags:

access:  public


Parameters

string   $name  
string   $func  
string   $when  
[ Top ]



always [line 269]

boolean always( )

Always

returns true




Tags:

return:  true
access:  public


[ Top ]



aspect_join_functions [line 209]

void aspect_join_functions( string $func, string $callback, [string $type = 'after'])

aspect_join_functions

add trigger function name pairs to GLOBALS




Tags:

access:  public


Parameters

string   $func  
string   $callback  
string   $type  
[ Top ]



before_filter [line 225]

void before_filter( string $name, string $func, [string $when = 'before'])

Before Filter

set an aspect function to trigger before another function




Tags:

access:  public


Parameters

string   $name  
string   $func  
string   $when  
[ Top ]



breadcrumbs [line 595]

void breadcrumbs( )



[ Top ]



check_cookie [line 828]

void check_cookie( )

check_cookie

is the Cookie fit for consumption?




Tags:

access:  public


[ Top ]



classify [line 25]

string classify( string $resource)

classify

takes a table/resource name ('entries') makes it singular & capitalized ('Entry')




Tags:

access:  public


Parameters

string   $resource  
[ Top ]



content_for_layout [line 586]

void content_for_layout( string $template)

content_for_layout

render a _template using content-negotiation




Tags:

access:  public


Parameters

string   $template  
[ Top ]



content_types [line 616]

void content_types( )



[ Top ]



controller_path [line 356]

string controller_path( )

controller_path

path to controllers




Tags:

access:  public


[ Top ]



dbscript_error [line 118]

void dbscript_error( integer $errno, string $errstr, string $errfile, integer $errline)

Error

custom Error handling per-client-type




Tags:

todo:  return based on content-negotiation status
access:  public
author:  Brian Hendrickson <brian@dbscript.net>


Parameters

integer   $errno  
string   $errstr  
string   $errfile  
integer   $errline  
[ Top ]



dbscript_path [line 311]

string dbscript_path( )

dbscript_path

path to library/dbscript




Tags:

access:  public


[ Top ]



dbsession_model [line 698]

string dbsession_model( )

dbsession_model

get global DbSession data model




Tags:

access:  public


[ Top ]



db_include [line 660]

string db_include( $file)

db_include

get global Mapper object




Tags:

access:  public


Parameters

   $file  
[ Top ]



db_object [line 370]

string &db_object( )

db_object

get global Database object




Tags:

access:  public


[ Top ]



dictionary_parse [line 935]

array dictionary_parse( string $data)

dictionary_parse

Parses an xml dictionary. First argument is file name OR xml data. Second argument must be 'true' if the first arg is file name.

  1.  $array dictionary_parse$file_nametrue );




Tags:

access:  public
author:  Brian Hendrickson <brian@dbscript.net>


Parameters

string   $data  
[ Top ]



dircopy [line 1028]

void dircopy( $srcdir, $dstdir, [ $verbose = false])



Parameters

   $srcdir  
   $dstdir  
   $verbose  
[ Top ]



drop_array_element [line 909]

void drop_array_element( $array_with_elements, $key_name, string $str)

drop_array_element

returns the array minus the named element




Tags:

access:  public


Parameters

string   $str  
   $array_with_elements  
   $key_name  
[ Top ]



environment [line 376]

void &environment( )



[ Top ]



fetch_blob [line 406]

void fetch_blob( $value)



Parameters

   $value  
[ Top ]



form_for [line 465]

void form_for( &$resource, &$member, $url, string $template)

Form For

generate a form action string




Tags:

todo:  implement
access:  public


Parameters

string   $template  
   &$resource  
   &$member  
   $url  
[ Top ]



getEtag [line 895]

void getEtag( $id)



Parameters

   $id  
[ Top ]



get_script_name [line 1012]

string get_script_name( )

get_script_name

the name of the current script




Tags:

access:  public


[ Top ]



header_status [line 783]

void header_status( string $status)

header_status



Tags:

access:  public


Parameters

string   $status  
[ Top ]



ignore_errors [line 325]

boolean ignore_errors( )

ignore_errors

returns value of environment variable, if set




Tags:

access:  public


[ Top ]



in_string [line 994]

boolean in_string( string $needle, array $haystack, [integer $insensitive = 0])

in_string

search for a substring




Tags:

access:  public


Parameters

string   $needle  
array   $haystack  
integer   $insensitive  
[ Top ]



is_obj [line 1070]

boolean is_obj( &$object, [boolean $check = null], [boolean $strict = true], object $object)

is_obj

more flexible is_object




Tags:

access:  public


Parameters

object   $object  
boolean   $check  
boolean   $strict  
   &$object  
[ Top ]



library_path [line 297]

string library_path( )

library_path

path to libraries




Tags:

access:  public


[ Top ]



magic_quotes_stripquotes [line 766]

array magic_quotes_stripquotes( array $a)

magic_quotes_stripquotes



Tags:

access:  public


Parameters

array   $a  
[ Top ]



magic_quotes_stripquotes_b [line 748]

array magic_quotes_stripquotes_b( array $a)

magic_quotes_stripquotes_b



Tags:

access:  public


Parameters

array   $a  
[ Top ]



magic_quotes_stripslashes [line 730]

array magic_quotes_stripslashes( array $a)

magic_quotes_stripslashes



Tags:

access:  public


Parameters

array   $a  
[ Top ]



magic_quotes_stripslashes_b [line 712]

array magic_quotes_stripslashes_b( array $a)

magic_quotes_stripslashes_b



Tags:

access:  public


Parameters

array   $a  
[ Top ]



model_path [line 283]

string model_path( )

model_path

path to data models




Tags:

access:  public


[ Top ]



never [line 255]

boolean never( )

Never

returns false




Tags:

return:  false
access:  public


[ Top ]



plugin_path [line 342]

string plugin_path( )

plugin_path

path to data models




Tags:

access:  public


[ Top ]



randomstring [line 882]

string randomstring( integer $len)

Randomstring

give it a string length and you will receive a random string!




Tags:

access:  public


Parameters

integer   $len  
[ Top ]



redirect_to [line 512]

void redirect_to( $param, [ $altparam = NULL], string $template)

Redirect To

redirect the browser via Routes




Tags:

access:  public


Parameters

string   $template  
   $param  
   $altparam  
[ Top ]



render [line 530]

void render( $param, $value, string $template)

Render

render template or blob using content-negotiation




Tags:

access:  public


Parameters

string   $template  
   $param  
   $value  
[ Top ]



render_blob [line 382]

void render_blob( $value)



Parameters

   $value  
[ Top ]



render_partial [line 560]

void render_partial( string $template)

Render Partial

render a _template using content-negotiation




Tags:

access:  public


Parameters

string   $template  
[ Top ]



request_object [line 610]

Mapper &request_object( )

request_object

get global Mapper object




Tags:

access:  public


[ Top ]



response_object [line 645]

View &response_object( )

response_object

get global View object




Tags:

access:  public


[ Top ]



set_cookie [line 799]

void set_cookie( integer $userid)

set_cookie

bake a fresh Cookie




Tags:

access:  public


Parameters

integer   $userid  
[ Top ]



tableize [line 67]

string tableize( $object, string $table)

tableize

takes a (CamelCase or not) name ('DbSession') makes it lower_case and plural ('db_sessions')




Tags:

access:  public


Parameters

string   $table  
   $object  
[ Top ]



template_exists [line 441]

boolean template_exists( &$request, string $extension, $template, Mapper $request)

template_exists

find a template during content-negotiation




Tags:

access:  public


Parameters

Mapper   $request  
string   $extension  
   &$request  
   $template  
[ Top ]



timestamp [line 685]

void timestamp( )



[ Top ]



trigger_after [line 189]

void trigger_after( string $func, &$obj_a, &$obj_b, object $obj_a, object $obj_b)

Trigger After

trip after filters for a function




Tags:

access:  public


Parameters

string   $func  
object   $obj_a  
object   $obj_b  
   &$obj_a  
   &$obj_b  
[ Top ]



trigger_before [line 169]

void trigger_before( string $func, &$obj_a, &$obj_b, object $obj_a, object $obj_b)

Trigger Before

trip before filters for a function




Tags:

access:  public


Parameters

string   $func  
object   $obj_a  
object   $obj_b  
   &$obj_a  
   &$obj_b  
[ Top ]



unset_cookie [line 814]

void unset_cookie( )

unset_cookie

throw the Cookie away? noo..




Tags:

access:  public


[ Top ]



url_for [line 494]

void url_for( array $params, [array $altparams = NULL])

URL For

generate a url from a Route




Tags:

access:  public


Parameters

array   $params  
array   $altparams  
[ Top ]



vars [line 848]

string vars( $varios, [ $scope = false], [ $prefix = 'unique'], [ $suffix = 'value'], string $var)

Vars

mutator function makes an array of local variables extractable




Tags:

access:  public


Parameters

string   $var  
   $varios  
   $scope  
   $prefix  
   $suffix  
[ Top ]



version [line 679]

string version( )

version

get dbscript version




Tags:

access:  public


[ Top ]



Documentation generated on Mon, 19 Feb 2007 10:25:04 -0800 by phpDocumentor 1.3.1