public/wordpress/wp-content/plugins/backupbuddy/lib/dbreplace/dbreplace.php
/**
		 *	recursive_object_replace()
		 *	
		 *	Recursively replace text in an object, stepping through objects/arrays within objects/arrays as needed.
		 *	
		 *	@param		string		$find		Text to find.
		 *	@param		string		$replace	Text to replace found text with.
		 *	@param		reference	&$data		Pass the variable to change the data within.
		 *	@return		boolean					Always true currently.
		 *
		 */


Recursively replace text in an object, stepping through objects/arrays within objects/arrays as needed.

@param          string          $find           Text to find.
@param          string          $replace        Text to replace found text with.
@param          reference       &$data          Pass the variable to change the data within.
@return         boolean                                 Always true currently.
Recursively replace text in an object stepping through objects / arrays within objects / arrays as needed . @param string $find Text to find . @param string $replace Text to replace found text with . @param reference &$data Pass the variable to change the data within . @return boolean Always true currently .
public function recursive_object_replace( $find, $replace, &$data ) {
			if ( is_object( $data ) ) {
				$vars = get_object_vars( $data );
				foreach( $vars as $key => $var ) {
					if ( is_array( $data->{$key} ) ) {
						$this->recursive_array_replace( $find, $replace, $data->{$key} );
					} elseif ( is_object( $data->{$key} ) ) {
						$this->recursive_object_replace( $find, $replace, $data->{$key} );
					} elseif ( is_string( $data->{$key} ) ) {
						$data->{$key} = str_replace( $find, $replace, $data->{$key} );
					}
				}
			} elseif ( is_string( $data ) ) {
				$data = str_replace( $find, $replace, $data );
			} elseif ( is_array( $data ) ) {
				$this->recursive_array_replace( $find, $replace, $data );
			}
		}
public function recursive_object_replace ( $ find , $ replace , & $ data ) { if ( is_object ( $ data ) ) { $ vars = get_object_vars ( $ data ) ; foreach ( $ vars as $ key => $ var ) { if ( is_array ( $ data -> { $ key } ) ) { $ this -> recursive_array_replace ( $ find , $ replace , $ data -> { $ key } ) ; } elseif ( is_object ( $ data -> { $ key } ) ) { $ this -> recursive_object_replace ( $ find , $ replace , $ data -> { $ key } ) ; } elseif ( is_string ( $ data -> { $ key } ) ) { $ data -> { $ key } = str_replace ( $ find , $ replace , $ data -> { $ key } ) ; } } } elseif ( is_string ( $ data ) ) { $ data = str_replace ( $ find , $ replace , $ data ) ; } elseif ( is_array ( $ data ) ) { $ this -> recursive_array_replace ( $ find , $ replace , $ data ) ; } }
recursive_object_replace()
recursive_object_replace ()
// ARRAYS // OBJECTS // STRINGS