BEdita API doc | 4-cactus
  • Class
  • Tree
  • Deprecated
  • Download

Classes

  • Addon
  • AddressbookController
  • AddressbookShell
  • AdminController
  • Alias
  • Annotation
  • ApiAuthComponent
  • ApiBaseController
  • ApiFormatterComponent
  • ApiUploadComponent
  • ApiValidatorComponent
  • AppController
  • AppError
  • AppHelper
  • Application
  • AppModel
  • Area
  • AreasController
  • Audio
  • AuthenticationsController
  • BannedIp
  • BEAppModel
  • BEAppObjectModel
  • BeAuthComponent
  • BeAuthFacebookComponent
  • BeAuthGoogleComponent
  • BeAuthTwitterComponent
  • BeCallbackManager
  • BeConfigure
  • BeCustomPropertyComponent
  • BeditaAnnotationModel
  • BeditaBaseShell
  • BeditaCollectionModel
  • BeditaContentModel
  • BeditaExportFilter
  • BeditaImportFilter
  • BeditaObjectModel
  • BeditaProductModel
  • BeditaShell
  • BeditaSimpleObjectModel
  • BeditaSimpleStreamModel
  • BeditaStreamModel
  • BeEmbedFlashHelper
  • BeEmbedHtml5Helper
  • BeEmbedMediaHelper
  • BeErrorCode
  • BeExceptionHandler
  • BEFile
  • BeFileHandlerComponent
  • BeFormHelper
  • BeFrontHelper
  • BeHashComponent
  • BeHtmlHelper
  • BeLangTextComponent
  • BeLib
  • BeMailComponent
  • BEObject
  • BeObjectCache
  • BePaginatorToolbarHelper
  • BeSchema
  • BeSecurityComponent
  • BeSystem
  • BeSystemComponent
  • BeThumb
  • BeTimeHelper
  • BeToolbarHelper
  • BeTreeComponent
  • BeTreeHelper
  • BeUploadToObjComponent
  • BeurlHelper
  • BeVimeoComponent
  • BeYoutubeComponent
  • BuildFilterBehavior
  • CacheableBehavior
  • CacheShell
  • CallbackBehavior
  • CaptchaComponent
  • Caption
  • CaptionsBehavior
  • Card
  • CardsImportFilter
  • Category
  • CleanupDataTask
  • CleanupTask
  • Comment
  • CommentsController
  • CompactResultBehavior
  • Content
  • CreateIndexFieldsBehavior
  • DataShell
  • DataTransfer
  • DateItem
  • DbadminShell
  • DeleteDependentObjectBehavior
  • DeleteObjectBehavior
  • DeployShell
  • Document
  • DocumentsController
  • DumpModel
  • EditorialContentsShell
  • EditorNote
  • Event
  • EventLog
  • EventsController
  • FilesController
  • ForeignDependenceSaveBehavior
  • FrontendController
  • FrontendShell
  • GalleriesController
  • Gallery
  • GeoTag
  • GettextShell
  • Git
  • GravatarHelper
  • Group
  • HashJob
  • History
  • HomeController
  • Image
  • ImageInfoHelper
  • JsonExportFilter
  • JsonImportFilter
  • JsonView
  • LangText
  • Link
  • MailGroup
  • MailGroupCard
  • MailJob
  • MailLog
  • MailMessage
  • MailShell
  • MailTemplate
  • Mask
  • MediaShell
  • MigrateDumpModel
  • MigrateShell
  • Migration
  • MigrationBase
  • MigrationDateItemsShell
  • Module
  • ModulesController
  • ModuleShell
  • MultimediaController
  • NewsController
  • NewsletterController
  • NewsletterShell
  • NotifyBehavior
  • ObjectEditor
  • ObjectProperty
  • ObjectRelation
  • ObjectType
  • ObjectUser
  • PagesController
  • Permission
  • PermissionModule
  • PermsHelper
  • Product
  • Property
  • PropertyOption
  • PublicationShell
  • RedisShell
  • RelationCheck
  • RelationRepair
  • RelationShell
  • RelationStats
  • RemoveDummyNameBehavior
  • ResponseHandlerComponent
  • RestClientModel
  • Revision
  • RevisionObjectBehavior
  • SearchText
  • SearchTextSaveBehavior
  • Section
  • SectionDummy
  • SessionFilterComponent
  • SessionFilterHelper
  • ShortNews
  • SmartyView
  • SoapClientModel
  • SplitterSql
  • StatisticsController
  • Stream
  • StreamLog
  • StreamsController
  • Svn
  • TagsController
  • ThemeSmartyView
  • ThumbnailHelper
  • ThumbShell
  • TransactionComponent
  • TransactionFS
  • TranslationsController
  • Tree
  • TrHelper
  • User
  • UserProperty
  • UsersController
  • Utility
  • Version
  • Video
  • VimeoHelper
  • WebmarksController
  • XmlExportFilter
  • XmlImportFilter
  • XmlJsonConverter
  • XmlView
  • YoutubeHelper

Interfaces

  • ApiAuthInterface
  • MediaProviderInterface
  • UploadableInterface

Exceptions

  • BeditaAjaxException
  • BEditaAllowURLException
  • BeditaBadRequestException
  • BeditaConflictException
  • BEditaDeleteStreamObjException
  • BeditaException
  • BEditaFileExistException
  • BeditaForbiddenException
  • BeditaFrontAccessException
  • BeditaHashException
  • BEditaInfoException
  • BeditaInternalErrorException
  • BEditaIOException
  • BeditaLengthRequiredException
  • BeditaMailException
  • BEditaMediaProviderException
  • BeditaMethodNotAllowedException
  • BEditaMIMEException
  • BeditaNotFoundException
  • BeditaNotImplementedException
  • BeditaPublicationException
  • BeditaRuntimeException
  • BEditaSaveStreamObjException
  • BeditaServiceUnavailableException
  • BeditaUnauthorizedException
  • BEditaUploadPHPException
  • BEditaURLException

Class BeLib

BEdita libs class. Instantiate and put in the registry other classes

Located at libs/be_lib.php

Methods summary

public static &
# getInstance( )
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

BeCallbackManager
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

BeErrorCode
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

$mime
mime type

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

$item
$key
$obj
$values
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

$nickname

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

$path

Returns

array

Properties summary

private array $__arrayFlat

used to flatten arrays in BeLib::arrayValues()

used to flatten arrays in BeLib::arrayValues()

# array()
BEdita API doc | 4-cactus API documentation generated by ApiGen