public static function setSource($source = null)
    {
        if (! is_resource($source) && ! is_null($source)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid source provided; must be a null or an resource, "%s" given.',
                is_object($source) ? get_class($source) : gettype($source)
            ));
        }
        static::$source = $source;
    }
public static function setSource($source = null)
    {
        if (! is_resource($source) && ! is_null($source)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid source provided; must be a null or an resource, "%s" given.',
                is_object($source) ? get_class($source) : gettype($source)
            ));
        }
        static::$source = $source;
    }
public static function setSource ( $ source = null ) { if ( ! is_resource ( $ source ) && ! is_null ( $ source ) ) { throw new InvalidArgumentException ( sprintf ( 'Invalid source provided; must be a null or an resource, "%s" given.' , is_object ( $ source ) ? get_class ( $ source ) : gettype ( $ source ) ) ) ; } static :: $ source = $ source ; }
Sets data source.

@param null|resource $source

@throws \InvalidArgumentException If invalid source provided
Sets data source .