Naguro_Image_Request_Factory

The WooCommerce Naguro Connect Naguro Image Request Factory class.

Defined (1)

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

/includes/naguro/requests/factories/class-image-request-factory.php  
  1. class Naguro_Image_Request_Factory implements Naguro_Request_Factory { 
  2. public function get_request_by_method( $method ) { 
  3. if ( 'upload' === $method ) { 
  4. return new Naguro_Image_Upload_Request( $_POST ); 
  5. } elseif ( 'getsrc' === $method ) { 
  6. return new Naguro_Image_Get_Request( $_POST ); 
  7.  
  8. throw new Exception( 'Invalid method.' );