skipv1_0_0Display

The Facebook Fanpage Import skip v1 0 Display class.

Defined (1)

The class is defined in the following location(s).

/includes/skip/core/display.php  
  1. class Display{ 
  2.  
  3. var $display; 
  4.  
  5. /** 
  6. * Constructor 
  7. * @since 1.0 
  8. */ 
  9. function __construct( $display = '' ) { 
  10. $this->display = $display; 
  11.  
  12. /** 
  13. * Diplay Skip Content 
  14. * @since 1.0 
  15. * @param mixed $elements Array / Object of elements which have to be shown 
  16. * @return string $html The HTML of the display object 
  17. */  
  18. function render( $elements = '', $hide = FALSE ) { 
  19. $html = ''; 
  20.  
  21. // If element is no array and no object 
  22. if( !is_array( $elements ) && !is_object( $elements ) ) { 
  23. // If internal display var is there, use it 
  24. if( is_object( $this->display ) || is_array( $this->display ) ) { 
  25. $elements = $this->display;  
  26.  
  27. // If it's array, run all elements  
  28. if( is_array( $elements ) ) { 
  29. foreach ( $elements AS $element ) { 
  30.  
  31. // If subelement is an array 
  32. if( is_array( $element ) ) { 
  33. $html.= $this->render( $element, $hide ); 
  34.  
  35. // If it's an object 
  36. }elseif( is_object( $element ) ) { 
  37. $html.= $element->render( $hide_element ); 
  38.  
  39. // It's anything else 
  40. }else{ 
  41. if( !$hide ) 
  42. $html.= $element; 
  43. return $html; 
  44.  
  45. // Objects have to give back their html 
  46.  
  47. // Return the waste! ;) 
  48. }else{ 
  49. return $elements;