CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 1.2 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 1.2
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Classes

  • AclBase
  • AclBehavior
  • AclComponent
  • AclNode
  • AclShell
  • Aco
  • AcoAction
  • AjaxHelper
  • ApcEngine
  • ApiShell
  • App
  • AppController
  • AppHelper
  • AppModel
  • Aro
  • AuthComponent
  • BakeShell
  • BehaviorCollection
  • Cache
  • CacheEngine
  • CacheHelper
  • CakeErrorController
  • CakeLog
  • CakeSchema
  • CakeSession
  • CakeSocket
  • ClassRegistry
  • Component
  • Configure
  • ConnectionManager
  • ConsoleShell
  • ContainableBehavior
  • Controller
  • ControllerTask
  • CookieComponent
  • DataSource
  • DbAcl
  • DbAclSchema
  • DbConfigTask
  • DboAdodb
  • DboDb2
  • DboFirebird
  • DboMssql
  • DboMysql
  • DboMysqlBase
  • DboMysqli
  • DboOdbc
  • DboOracle
  • DboPostgres
  • DboSource
  • DboSqlite
  • DboSybase
  • Debugger
  • EmailComponent
  • ErrorHandler
  • ExtractTask
  • File
  • FileEngine
  • Flay
  • Folder
  • FormHelper
  • Helper
  • HtmlHelper
  • HttpSocket
  • I18n
  • I18nModel
  • i18nSchema
  • I18nShell
  • Inflector
  • IniAcl
  • JavascriptHelper
  • JsHelper
  • JsHelperObject
  • L10n
  • MagicDb
  • MagicFileResource
  • MediaView
  • MemcacheEngine
  • Model
  • ModelBehavior
  • ModelTask
  • Multibyte
  • NumberHelper
  • Object
  • Overloadable
  • Overloadable2
  • PagesController
  • PaginatorHelper
  • Permission
  • PluginTask
  • ProjectTask
  • RequestHandlerComponent
  • Router
  • RssHelper
  • Sanitize
  • Scaffold
  • ScaffoldView
  • SchemaShell
  • Security
  • SecurityComponent
  • SessionComponent
  • SessionHelper
  • SessionsSchema
  • Set
  • Shell
  • String
  • TestSuiteShell
  • TestTask
  • TextHelper
  • ThemeView
  • TimeHelper
  • TranslateBehavior
  • TreeBehavior
  • Validation
  • View
  • ViewTask
  • XcacheEngine
  • Xml
  • XmlElement
  • XmlHelper
  • XmlManager
  • XmlNode
  • XmlTextNode

Functions

  • __enclose
  • make_clean_css
  • mb_encode_mimeheader
  • mb_stripos
  • mb_stristr
  • mb_strlen
  • mb_strpos
  • mb_strrchr
  • mb_strrichr
  • mb_strripos
  • mb_strrpos
  • mb_strstr
  • mb_strtolower
  • mb_strtoupper
  • mb_substr
  • mb_substr_count
  • write_css_cache

Class JsHelper

Javascript Generator helper class for easy use of JavaScript.

JsHelper provides an abstract interface for authoring JavaScript with a given client-side library.

Object
Extended by Overloadable2
Extended by JsHelper
Package: cake\cake\libs\view\helpers
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc.
License: The MIT License
Location: view/helpers/js.php

Properties summary

  • $__objects public
    array
  • $action public
  • $base public
  • $data public
  • $effectMap public
    array
  • $helpers public
    array
  • $here public
  • $hook public
  • $output public
    boolean
  • $params public
  • $plugin public
  • $themeWeb public
  • $webroot public

Inherited Properties

  • _log

Method Summary

  • __construct() public
    Class constructor, overridden in descendant classes.
  • __object() public
  • alert_() public
  • call__() public
  • confirm_() public
  • escape() public
    Escape a string to be JavaScript friendly.
  • get__() public
  • if_() public
  • load_() public
    Loads a remote URL
  • object() public

    Generates a JavaScript object in JavaScript Object Notation (JSON) from an array

  • prompt_() public
  • real() public
  • redirect_() public
    Redirects to a URL
  • select() public
  • tryThese_() public

Method Detail

__construct() public ¶

__construct( )

Class constructor, overridden in descendant classes.

Overrides
Object::__construct()

__object() public ¶

__object( $name , $var )

alert_() public ¶

alert_( $message )

call__() public ¶

call__( $method , $params )

confirm_() public ¶

confirm_( $message )

escape() public ¶

escape( string $string )

Escape a string to be JavaScript friendly.

List of escaped ellements: + "\r\n" => '\n' + "\r" => '\n' + "\n" => '\n' + '"' => '\"' + "'" => "\'"

Parameters
string $string
$script String that needs to get escaped.
Returns
string
Escaped string.

get__() public ¶

get__( $name )

if_() public ¶

if_( $if , $then , $else = null , $elseIf = array() )

load_() public ¶

load_( string $url = null , array $options = array() )

Loads a remote URL

Parameters
string $url optional null
array $options optional array()
Returns
string

object() public ¶

object( array $data = array() , boolean $block = false , string $prefix = '' , string $postfix = '' , array $stringKeys = array() , boolean $quoteKeys = true , string $q = "\"" )

Generates a JavaScript object in JavaScript Object Notation (JSON) from an array

Parameters
array $data optional array()
Data to be converted
boolean $block optional false
Wraps return value in a