Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Function to prepare data for return to client
- * @access private
- * @param string $data
- */
- function objectify( $data )
- {
- if( $this->type == 'json' ) {
- if (function_exists(json_decode)){
- return json_decode( $data );
- }
- }
- else if( $this->type == 'xml' )
- {
- if( function_exists('simplexml_load_string') ) :
- $obj = simplexml_load_string( $data );
- endif;
- return $obj;
- }
- else
- return false;
- }
Add Comment
Please, Sign In to add comment