PodAPI

Include and Init the PodsAPI class.

Defined (1)

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

/deprecated/deprecated.php  
  1. class PodAPI 
  2. private $new; 
  3.  
  4. public static $deprecated_notice = true; 
  5.  
  6. function __construct ( $type = null, $format = null ) { 
  7. if ( self::$deprecated_notice ) { 
  8. pods_deprecated( 'PodAPI (class)', '2.0', 'pods_api (function)' ); 
  9.  
  10. $this->new = pods_api( $type, $format ); 
  11.  
  12. /** 
  13. * Handle variables that have been deprecated 
  14. * @since 2.0 
  15. */ 
  16. public function __get ( $name ) { 
  17. $name = (string) $name; 
  18.  
  19. $var = $this->new->{$name}; 
  20.  
  21. return $var; 
  22.  
  23. /** 
  24. * Handle methods that have been deprecated 
  25. * @since 2.0 
  26. */ 
  27. public function __call ( $name, $args ) { 
  28. $name = (string) $name; 
  29.  
  30. return call_user_func_array( array( $this->new, $name ), $args );