public static
&
|
|
public static
class
&
|
#
getObject( string $name, string $paths = null )
return an instance of a class (by default search in libs dir)
If class is not instantiated do it and put in CakePHP registry
return an instance of a class (by default search in libs dir)
If class is not instantiated do it and put in CakePHP registry
Parameters
- $name
- class name (file has to be underscorized MyClass => my_class.php)
- $paths
- array $paths paths where search class file (search in libs folder by default)
Returns
class instance
|
public static
BeCallbackManager
|
#
eventManager( )
Return the instance of BeCallbackManager
Return the instance of BeCallbackManager
Returns
|
public static
BeErrorCode
|
#
errorCode( string $errorCode, array $options = array() )
Return the instance of BeErrorCode or other specific error code object
Return the instance of BeErrorCode or other specific error code object
Parameters
- $errorCode
- The error code
- $options
- An array of options to initialize the error code object
Returns
|
public
boolean
|
#
isBeditaObjectType( string $name, mixed $paths = null )
check if a class name is a BEdita object type
check if a class name is a BEdita object type
Parameters
- $name
- the class name
- $paths
array of paths or string path where searching the class
leave empty to use ClassRegistry
Returns
boolean
|
public
boolean
|
#
isFileNameUsed( string $filename, string $type, array $excludePaths = array() )
check if a file name is already used in Configure::$type."Paths"
check if a file name is already used in Configure::$type."Paths"
Parameters
- $filename
- $type
- (models, controllers, ...) see App::path
- $excludePaths
- path to exclude from search (paths have to end with DS trailing slash)
Returns
boolean
|
public
string
|
#
uniqueFilePath( string $name, string $prefix = null )
Starting from a file $name return a unique file path
Starting from a file $name return a unique file path
For example passing $name = 'filename.jpg'
it returns /03/e6/filename.jpgor /03/e6/filename-1.jpg`
if the first path tested already exists and so on.
Use mediaRoot for base path.
Parameters
- $name
- The file name
- $prefix
- The prefix used for building path
Returns
string
|
public
string
|
#
friendlyUrlString( string $value, string $keep = "" )
Modify a string to get friendly url version.
With a regexp you can choose which characters to preserve.
Modify a string to get friendly url version.
With a regexp you can choose which characters to preserve.
Parameters
- $value
- $keep
$keep, regexp fragment with characters to keep, e.g. "." will preserve points,
".:" points and semicolons
Returns
string
|
public
mixed
|
#
stripData( mixed $data, array $options = array() )
Strip scripts, images, whitespace or all together on $data
using Sanitize::stripScripts, Sanitize::stripImages, Sanitize::stripWhitespace, Sanitize::stripAll methods
see Sanitize class of cakephp for more info
Strip scripts, images, whitespace or all together on $data
using Sanitize::stripScripts, Sanitize::stripImages, Sanitize::stripWhitespace, Sanitize::stripAll methods
see Sanitize class of cakephp for more info
Parameters
- $data
- string or array
- $options
$options, possible values are:
"what" => "scripts" (default), "images", "whitespace", "all",
"recursive" => true (default) strip recursively on $data
Returns
mixed
|
public static
mixed
|
#
getTypeFromMIME( string $mime )
Return array with model name and eventually specific type (see $config[validate_resource][mime][Application])
from mime type
Return array with model name and eventually specific type (see $config[validate_resource][mime][Application])
from mime type
Parameters
Returns
mixed array|boolean
|
public
array
|
#
arrayValues( array $array, boolean $addStringKeys = false )
return values of multidimensional array
return values of multidimensional array
Parameters
- $array
- $addStringKeys
- if it's true add string keys to the returned array
Returns
array
|
private static
|
#
arrayValuesCallback( mixed & $item, mixed $key, array $obj )
callback method used from BeLib::arrayValues
callback method used from BeLib::arrayValues
Parameters
|
public
array
|
#
arrayKeys( array $ar, boolean $stringKeys = true )
return keys of multidimensional array
return keys of multidimensional array
Parameters
- $ar
- $stringKeys
- if it's true add string keys to the returned array
Returns
array
|
public
|
#
sqlDateFormat( string $value, string $dateType = "little-endian" )
Transform any numeric date in SQL date/datetime string format
Date types accepted: "little-endian"/"middle-endian"/"big-endian"
Transform any numeric date in SQL date/datetime string format
Date types accepted: "little-endian"/"middle-endian"/"big-endian"
if little endian, expected format id dd/mm/yyyy format, or dd.mm.yyyy, or dd-mm-yyyy
if middle endian, expected format is mm/dd/yyyy format, or mm.dd.yyyy (USA standard)
if big endian ==> yyyy-mm-dd
Examples:
Little endian
"22/04/98", "22/04/1998", "22.4.1998", "22-4-98", "22 4 98", "1998", "98", "22.04", "22/4", "22 4"
Middle endian
"4/22/98", "02/22/1998", "4.22.1998", "4-22-98", "4/22", "04.22"
If format is not valid or string is not parsable, an exception maybe thrown
Parameters
- $value
- $val, string in generic numeric form
- $dateType
- $dateType, "little-endian"/"middle-endian"/"big-endian"
|
public
string
|
#
variableFromNickname( string $nickname )
return conventional variable/method name starting from nickname
replacing '-' with '_' and camelizing (not first char)
return conventional variable/method name starting from nickname
replacing '-' with '_' and camelizing (not first char)
example: this-is-my-nickname become thisIsMyNickName
Parameters
Returns
string
|
public
array
|
#
getFrontendFolders( )
generate an array of frontend folders
generate an array of frontend folders
Returns
array
|
public
array
|
#
getAddonFolders( )
generate an array of addon folders
generate an array of addon folders
Returns
array
|
public
array
|
#
getPluginModuleFolders( )
generate an array of plugin module folders
generate an array of plugin module folders
Returns
array
|
public
array
|
#
remoteUpdateAddons( string $path )
update Addons after project update
update Addons after project update
Parameters
Returns
array
|