PHP 클래스 Pommo_Json, poMMo

This file is part of poMMo (http://www.pommo.org) poMMo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or any later version. poMMo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with program; see the file docs/LICENSE. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
파일 보기 프로젝트 열기: soonick/poMMo 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_failMsg
$_output
$_successMsg

공개 메소드들

메소드 설명
__construct ( $toggleEscaping = true )
add ( $key, $value = false ) beware of key conflicts (especially when passing arrays)!
addErr ( $e )
addMsg ( $m )
encode ( $input ) * JSON Encoding Methods authored by Jack Sleight (below); ---------------------------------------------------------------------- Version 0.5 Copyright Jack Sleight - www.reallyshiny.com This script is licensed under the: Creative Commons Attribution-ShareAlike 2.5 License ----------------------------------------------------------------------
escape ( $string )
fail ( $msg = false )
get ( $key, $value, $parent = NULL )
is_assoc ( $array )
loop ( $input, $type )
prefix ( $prefix, &$msg ) NOTE; message is passed by reference (modified via this function).
serve ( $success = true ) return/output the JSON
setFailMsg ( $msg ) sets the default success/failure message
setSuccessMsg ( $msg )
success ( $msg = false )
type ( $key, $value )

메소드 상세

__construct() 공개 메소드

public __construct ( $toggleEscaping = true )

add() 공개 메소드

beware of key conflicts (especially when passing arrays)!
public add ( $key, $value = false )

addErr() 공개 메소드

public addErr ( $e )

addMsg() 공개 메소드

public addMsg ( $m )

encode() 공개 메소드

* JSON Encoding Methods authored by Jack Sleight (below); ---------------------------------------------------------------------- Version 0.5 Copyright Jack Sleight - www.reallyshiny.com This script is licensed under the: Creative Commons Attribution-ShareAlike 2.5 License ----------------------------------------------------------------------
public encode ( $input )

escape() 공개 메소드

public escape ( $string )

fail() 공개 메소드

public fail ( $msg = false )

get() 공개 메소드

public get ( $key, $value, $parent = NULL )

is_assoc() 공개 메소드

public is_assoc ( $array )

loop() 공개 메소드

public loop ( $input, $type )

prefix() 공개 메소드

NOTE; message is passed by reference (modified via this function).
public prefix ( $prefix, &$msg )

serve() 공개 메소드

return/output the JSON
public serve ( $success = true )

setFailMsg() 공개 메소드

sets the default success/failure message
public setFailMsg ( $msg )

setSuccessMsg() 공개 메소드

public setSuccessMsg ( $msg )

success() 공개 메소드

public success ( $msg = false )

type() 공개 메소드

public type ( $key, $value )

프로퍼티 상세

$_failMsg 공개적으로 프로퍼티

public $_failMsg

$_output 공개적으로 프로퍼티

public $_output

$_successMsg 공개적으로 프로퍼티

public $_successMsg