public static function __getExtensionFromHandle($type, $r_handle)
    {
        $manager = self::getManagerFromType($type);

        if (!isset($manager)) {
            throw new Exception(__('Unable to find a Manager class for this resource.'));
        }

        $type = str_replace('_', '-', self::getColumnFromType($type));
        preg_match('/extensions\/(.*)\/' . $type . '/', call_user_func(array($manager, '__getClassPath'), $r_handle), $data);

        $data = array_splice($data, 1);

        if (empty($data)) {
            return null;
        } else {
            return $data[0];
        }
    }
public static function __getExtensionFromHandle($type, $r_handle)
    {
        $manager = self::getManagerFromType($type);

        if (!isset($manager)) {
            throw new Exception(__('Unable to find a Manager class for this resource.'));
        }

        $type = str_replace('_', '-', self::getColumnFromType($type));
        preg_match('/extensions\/(.*)\/' . $type . '/', call_user_func(array($manager, '__getClassPath'), $r_handle), $data);

        $data = array_splice($data, 1);

        if (empty($data)) {
            return null;
        } else {
            return $data[0];
        }
    }
public static function __getExtensionFromHandle ( $ type , $ r_handle ) { $ manager = self :: getManagerFromType ( $ type ) ; if ( ! isset ( $ manager ) ) { throw new Exception ( __ ( 'Unable to find a Manager class for this resource.' ) ) ; } $ type = str_replace ( '_' , '-' , self :: getColumnFromType ( $ type ) ) ; preg_match ( '/extensions\/(.*)\/' . $ type . '/' , call_user_func ( array ( $ manager , '__getClassPath' ) , $ r_handle ) , $ data ) ; $ data = array_splice ( $ data , 1 ) ; if ( empty ( $ data ) ) { return null ; } else { return $ data [ 0 ] ; } }
Given the type and handle of a resource, return the extension it belongs to.

@param integer $type
The resource type, either `RESOURCE_TYPE_EVENT` or `RESOURCE_TYPE_DS`
@param string $r_handle
The handle of the resource.
@throws Exception
@return string
The extension handle.
Given the type and handle of a resource return the extension it belongs to .