src/Service/MelisCoreGeneralService.php
public function splitData($prefix, $haystack = array())
	{
	    $data = array();
	    
	    if($haystack) {
	        
	        foreach($haystack as $key => $value) {
	            if(strpos($key, $prefix) !== false) {
	                $data[$key] = $value;
	            }
	            
	        }
	        
	    }
	    
	    return $data;
	}
public function splitData($prefix, $haystack = array())
	{
	    $data = array();
	    
	    if($haystack) {
	        
	        foreach($haystack as $key => $value) {
	            if(strpos($key, $prefix) !== false) {
	                $data[$key] = $value;
	            }
	            
	        }
	        
	    }
	    
	    return $data;
	}
public function splitData ( $ prefix , $ haystack = array ( ) ) { $ data = array ( ) ; if ( $ haystack ) { foreach ( $ haystack as $ key => $ value ) { if ( strpos ( $ key , $ prefix ) !== false ) { $ data [ $ key ] = $ value ; } } } return $ data ; }
Used to split array data and return the data you need
@param String $prefix of the array data
@param array $haystack
Used to split array data and return the data you need