-
(string) addIncludePath ($path, $position)
Browse code
| $path |
Single string path or an array of paths |
| $position |
Either 'front' or 'back' |
Adds a path to the PHP include_path setting.
returns The old include path
-
-
clearDirectory ($directory)
Browse code
| $directory |
An absolute filesystem path to a directory. |
Clear all files in a given directory.
-
| $pattern |
An absolute filesystem pattern. |
Clear all files and directories corresponding to a glob pattern.
-
(string) extractClassName ($filename)
Browse code
Extract the class or interface name from filename.
returns A class or interface name, if one can be extracted, otherwise null.
-
(array) getArrayValueForPath ($values, $name, $default)
Browse code
| $values |
The values to search |
| $name |
The token name |
| $default |
Default if not found |
Returns an array value for a path.
-
Get path to php cli.
throws sfException If no php cli found
-
(string) I18N_toEncoding ($string, $to)
Browse code
| $string |
the UTF-8 string for conversion |
| $to |
new encoding |
Converts UTF-8 strings to a different encoding. NB. The result may not have been encoded if iconv fails.
This file comes from Prado (BSD License)
returns encoded string.
-
(string) I18N_toUTF8 ($string, $from)
Browse code
| $string |
string to convert to UTF-8 |
| $from |
current encoding |
Converts strings to UTF-8 via iconv. NB, the result may not by UTF-8 if the conversion failed.
This file comes from Prado (BSD License)
returns UTF-8 encoded string, original string if iconv failed.
-
(boolean) isArrayValuesEmpty ($array)
Browse code
| $array |
the array to check |
Checks if array values are empty
returns true if empty, otherwise false
-
(bool) isPathAbsolute ($path)
Browse code
Determine if a filesystem path is absolute.
returns true, if the path is absolute, otherwise false.
-
Checks if a string is an utf8.
Yi Stone Li
Copyright (c) 2007 Yahoo! Inc. All rights reserved.
Licensed under the BSD open source license
returns true if $string is valid UTF-8 and false otherwise.
-
(mixed) literalize ($value, $quoted)
Browse code
Finds the type of the passed value, returns the value as the new type.
-
pregtr ($search, $replacePairs)
Browse code
| $search |
subject to search |
| $replacePairs |
array of search => replace pairs |
Returns subject replaced with regular expression matchs
-
(string) replaceConstants ($value)
Browse code
| $value |
the value to perform the replacement on |
Replaces constant identifiers in a scalar value.
returns the value with substitutions made
-
(array) stringToArray ($string)
Browse code
| $string |
the value to convert to array |
Converts string to array
-
(string) stripComments ($source)
Browse code
Strips comments from php source code
returns Comment free source code.
-
(array) stripslashesDeep ($value)
Browse code
| $value |
the value to strip |
Strip slashes recursively from array
returns clean value with slashes stripped