false, 'table' => false, 'query' => false, 'object' => false, 'meta' => false ); /** * Construct an EDD component * * @since 3.0 * @param array $args */ public function __construct( $args = array() ) { parent::__construct( $args ); } /** * Return an interface object * * @since 3.0 * * @param string $name * @return object */ public function get_interface( $name = '' ) { return isset( $this->interfaces[ $name ] ) ? $this->interfaces[ $name ] : false; } /** * Setup an EDD component based on parsing in constructor * * @since 3.0 * @param array $args */ protected function set_vars( $args = array() ) { // Get the interface keys $keys = array_keys( $this->interface_keys ); // Loop through args... foreach ( $args as $key => $value ) { // Set arg as a Component Interface if ( in_array( $key, $keys, true ) && class_exists( $value ) ) { $this->interfaces[ $key ] = new $value; // Set arg as a Component property } else { $this->{$key} = $value; } } } }