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

Class: Base_Cnc

Source Location: /base_classes/cnc.class.php

Class Overview


Project: Welcompose File: cnc.class.php


Author(s):

  • Andreas Ahlenstorf

Copyright:

  • 2008 creatics, Olaf Gleba

Methods



Class Details

[line 25]
Project: Welcompose File: cnc.class.php

Copyright (c) 2008 creatics

Project owner: creatics, Olaf Gleba 50939 Köln, Germany http://www.creatics.de

This file is licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE v3 http://www.opensource.org/licenses/agpl-v3.html

$Id: cnc.class.php 40 2006-06-18 12:05:47Z andreas $




Tags:

author:  Andreas Ahlenstorf
copyright:  2008 creatics, Olaf Gleba
license:  GNU AFFERO GENERAL PUBLIC LICENSE v3


[ Top ]


Class Methods


static method filterRequest [line 131]

static mixed filterRequest( &$var, $regex)

Filter request vars

Function to check if request vars (GPC etc.) match the given regex. You can pass undefined variables without getting a notice. When everything's fine, the function will return the input. Otherwise it will return NULL.




Tags:

var:  Input
access:  public


Parameters:

   &$var  
   $regex  

[ Top ]

static method ifsetor [line 150]

static mixed ifsetor( mixed &$var, mixed $alt)

Ifsetor

Userspace implementation of ifsetor. Short hand version of if ... else ... check for unitialized vars.




Tags:

access:  public


Parameters:

mixed   &$var   Var to check
mixed   $alt   Alternative to return

[ Top ]

static method removeSlashesArray [line 36]

static bool removeSlashesArray( array &$array)

Remove slashes array

stripslashes() replacement for multidimensional arrays, if magic_quotes_gpc is true, it will be applied twice.




Tags:

access:  public


Parameters:

array   &$array  

[ Top ]

static method removeSlashesString [line 66]

static bool removeSlashesString( string &$str)

Remove slashes string

Replacement for stripslashes(), that takes care of the actual magic_quotes_gpc setting.




Tags:

access:  public


Parameters:

string   &$str  

[ Top ]

static method removeTrailingSlash [line 110]

static string removeTrailingSlash( string $dir)

Remove trailing slash

Removes the trailing slash from a path to a directory




Tags:

return:  path to directory (without trailing slash)
access:  public


Parameters:

string   $dir   path to directory (with trailing slash)

[ Top ]

static method testArrayForNumericKeys [line 204]

static bool testArrayForNumericKeys( array &$array)

Tests if keys in supplied array are numeric. Takes array to test as first argument. Returns bool.



Tags:

access:  public


Parameters:

array   &$array   Array to test

[ Top ]

static method testArrayForNumericValues [line 228]

static bool testArrayForNumericValues( array &$array)

Tests if values in supplied array are numeric. Takes array to test as first argument. Returns bool.



Tags:

access:  public


Parameters:

array   &$array   Array to test

[ Top ]

static method uniqueId [line 92]

static string uniqueId( [int $length = 40])

Unique id

Creates unique id using rand() and sha1() or md5(). Two different id lengths are supported:

  • 40 (sha1() will be applied on the id)
  • 32 (mh5() will be applied on the id)




Tags:

access:  public


Parameters:

int   $length   Id length

[ Top ]

method randomString [line 168]

string randomString( int $length)

Random string

Generates random string consisting of chars and numbers.




Tags:

access:  public


Parameters:

int   $length   String length

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:44 +0100 by phpDocumentor 1.4.3