[ PHPXref.com ] [ Generated: Sun Jul 20 18:53:27 2008 ] [ myPHPNuke 1.8.8_8 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/classes/ -> core_NestedPageProject.class.php (summary)

MPN_188_8_Modules

Author: Kiril Threndor
Copyright: Copyright (C) 2003 Eric Haddix
License: http://www.gnu.org/licenses/gpl.html GPL 2.0
Version: $Id: core_NestedPageProject.class.php,v 1.3.2.6.4.1 2004/12/01 13:52:01 kirilt Exp $
File Size: 2425 lines (79 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

NestedPageProject:: (31 methods):
  initializeParent()
  nestRemotePage()
  validateRequestURI()
  getRemotePage()
  processNPNShare()
  localizeRemoteContent()
  sanitizeRemoteContent()
  prepFormRequest()
  buildRemoteURI()
  reverseParsedURI()
  verifyPath()
  buildDomainArray()
  insertContent()
  applyFormatArray()
  formatBody()
  setPointer()
  getStringPosition()
  searchAndReplace()
  stripTags()
  cutContent()
  addTags()
  adjustFormQuery()
  wrapContent()
  addContent()
  is_multi_array()
  redirectRequest()
  checkPHPVersion()
  verifyChildVars()
  returnError()
  dumpClassVariables()
  npDump()


Class: NestedPageProject  - X-Ref

initializeParent()   X-Ref
Parent Class Initializer

return: void

nestRemotePage()   X-Ref
This Is The N_P_P Class Control Center

This Is The Only Parent Class Method That Needs
To Be Called By The Child Class Directly In Most Cases

return: string ( Remote Body Ready For Display Or Error Message )

validateRequestURI()   X-Ref
Verify Incoming Request URI and Parent URI

return: bool ( true on success, error on fail )

getRemotePage()   X-Ref
Fetch Remote Page

return: mixed ( bool on success, error on fail )

processNPNShare()   X-Ref
No description

localizeRemoteContent()   X-Ref
Sanitize And Localize Remote Content

return: mixed ( bool on success, error on fail )

sanitizeRemoteContent( &$body, $sanity = array()   X-Ref
Run Remote Content Through The Sanitizer

param: string ( &$body      -> Body of text to process )
param: array  ( $sanity     -> Optional array of settings for the sanitizer )
param: bool   ( $update_pos -> Optional bool switch used to sanitizie the body
return: mixed ( bool on success, error on fail )

prepFormRequest()   X-Ref
Prepare A Form Submission For Sending To Remote Site

Additionally validate the local form against the remote sites copy

return: mixed ( bool on success, error on fail )

buildRemoteURI( &$uri, $request = FALSE, $recurse = FALSE )   X-Ref
Verify And Validate Remote URI / Link

param: string ( &$uri       -> Reference to URI/URL being processed )
param: bool   ( $request    -> TRUE = Requested URI, FALSE = Link Within Body Of Text )
param: bool   ( $recurse    -> Failsafe infinite loop break if method is recursing )
return: mixed ( bool on success, error on fail )

reverseParsedURI( $uri_parts )   X-Ref
Reverse A Parsed URI

param: array ( $uri_parts -> array of parts returned by parse_url() )
return: string ( reassembled URI )

verifyPath( &$path )   X-Ref
Verify The Path Component Of A URI Is Valid

Additionally, test the path for a potential filename

param: string ( &$path -> reference to current URI/link path component )
return: bool ( result of check for a possible filename in path )

buildDomainArray( $multiary, $retary = NULL, $key = 0 )   X-Ref
Build An Array Of Possible Domain Names For Remote Host

This method takes the different parts of the remote variables
that are related to domain names and builds them into an array
of possible valid domains that can then be compared to links within
the remote document body.

param: array ( $multiary -> array of child class variables that contain domain info )
param: array ( $retary   -> current array of domain names )
param: array ( $key      -> current array key of multiarray used during recursion )
return: array ( Array of possible domain names )

insertContent( &$body, $string, $where )   X-Ref
Insert Custom Content Into The Local Body

param: string ( &$body   -> body of text passed by reference )
param: string ( $string  -> string of text to add to body )
param: mixed  ( $where   -> string ( 'append' or 'prepend', or integer position )
return: bool  ( silent return true on error )

applyFormatArray( $ary_name, $opt_ary = NULL )   X-Ref
Apply Child Class Pre & Post Scan Arrays To Local Body

You may also pass a custom array to this method

param: string ( $ary_name -> pre/post scan array name )
param: array  ( $opt_ary  -> optional array to use. Must be in same
return: bool ( silent return true on error )

formatBody()   X-Ref
Format The Local Body

return: bool

setPointer( &$body, &$pos, $reset, $posadj )   X-Ref
Set Pointer Position In Document

return: void ( $pos passed by reference )

getStringPosition( $body, $string, $loc, $pos, $limit )   X-Ref
Find The Position Of A Tag In The Document Body

param: string  ( $body    -> body of text being processed )
param: string  ( $string  -> string to search for )
param: integer ( $loc     -> final location to place pointer at )
param: integer ( $pos     -> current position of pointer in $body )
param: integer ( $limit   -> limit search to this many characters from $pos )
return: integer ( position of tag )

searchAndReplace( &$body, $scan_type, $repl, $srch = NULL, $opt = null )   X-Ref
Used To Perform Search And Replace On Remote Content
This is mostly for providing easy child class building
Without having the need to touch the parent class

param: string  ( $body      -> reference to body of text being processed )
param: string  ( $scan_type -> what function to use )
param: mixed   ( $repl      -> replacement array or string )
param: mixed   ( $srch      -> search for array or string )
param: integer ( $opt       -> use for string length in substr replacements
return: array ( Array of possible domain names )

stripTags( $body, $striparys )   X-Ref
String Tags From A select portion of the body

param: string ( $body    -> content to act on )
param: array  ( $striparys -> array of parameters to perform actions on body )
return: string ( $body -> altered body of content )

cutContent( $body, $cutarys )   X-Ref
Cut And Insert Content From Body Of Text

param: string ( $body    -> content to act on )
param: array  ( $cutarys -> array of parameters to perform actions on body )
return: string ( $body -> altered body of content )

addTags( $body, $addarys )   X-Ref
Add Tags To Document

param: string ( $body    -> content to act on )
param: array  ( $addarys -> array of parameters to perform actions on body )
return: string ( $body -> altered body of content )

adjustFormQuery( &$query, $type )   X-Ref
Adjust A Form Query

return: bool ( silent return on error )

wrapContent()   X-Ref
Required N_P_P Comments And CSS Wrappers

return: bool

addContent()   X-Ref
Child Class Empty Method

This Method Should Be Redefined In The Child Class

return: void

is_multi_array( $array )   X-Ref
Determine If An Array Is Multi-Dimensional

param: array ( $array -> array to check )
return: bool ( TRUE = Yes )

redirectRequest( $uri )   X-Ref
Page Redirect Handler

return: void ( exit )

checkPHPVersion( $version )   X-Ref
Check PHP Version

return: bool

verifyChildVars()   X-Ref
Verify Child Variables Are Defined Properly

This check can be toggled off by using the
bool switch "disable_child_verify" in the class
variables

return: string ( error identifier for returnError method )

returnError( $error = NULL, $debug_data = NULL )   X-Ref
Method used to return error messages to user.

If debugging, it also will dump limited debugging data
and a list of the current class variables values.

Note: If Debugging, class will exit in this method.

param: string ( $error -> identifies the error )
param: mixed  ( $data -> mixed data to be dumped if in debugging mode )
return: string ( Error Message or exit if debugging )

dumpClassVariables( $classname )   X-Ref
Dump    Current    Values Of Class    Variables
Formatted For Easy Viewing In Web Browser

param: string ( $classname -> Name of the class you want variables dumped for )
return: void

npDump( $method, $msg = '', $data = '' )   X-Ref
Used to debug/create child classes
Dumps extensive data at each error
and processing stage

param: string ( $method -> Method name )
param: string ( $msg    -> Debugging message to display )
param: mixed  ( $data   -> Debugging data )
return: void



[ Powered by PHPXref - Served by Debian GNU/Linux ]