protected function setJavascriptFile($jsFileName, $hostsWithoutCDNrq = null)
    {
        if (is_null($hostsWithoutCDNrq)) {
            $hostsWithoutCDNrq = [];
        }
        if (in_array($this->getClientRealIpAddress(), $hostsWithoutCDNrq)) {
            return '<script type="text/javascript" src="' . filter_var($jsFileName, FILTER_SANITIZE_STRING)
                . '"></script>';
        }
        $patternFound = $this->setJavascriptFileCDN($jsFileName);
        return '<script type="text/javascript" src="' . $patternFound[1] . '"></script>' . $patternFound[2];
    }
protected function setJavascriptFile($jsFileName, $hostsWithoutCDNrq = null)
    {
        if (is_null($hostsWithoutCDNrq)) {
            $hostsWithoutCDNrq = [];
        }
        if (in_array($this->getClientRealIpAddress(), $hostsWithoutCDNrq)) {
            return '<script type="text/javascript" src="' . filter_var($jsFileName, FILTER_SANITIZE_STRING)
                . '"></script>';
        }
        $patternFound = $this->setJavascriptFileCDN($jsFileName);
        return '<script type="text/javascript" src="' . $patternFound[1] . '"></script>' . $patternFound[2];
    }
protected function setJavascriptFile ( $ jsFileName , $ hostsWithoutCDNrq = null ) { if ( is_null ( $ hostsWithoutCDNrq ) ) { $ hostsWithoutCDNrq = [ ] ; } if ( in_array ( $ this -> getClientRealIpAddress ( ) , $ hostsWithoutCDNrq ) ) { return '<script type="text/javascript" src="' . filter_var ( $ jsFileName , FILTER_SANITIZE_STRING ) . '"></script>' ; } $ patternFound = $ this -> setJavascriptFileCDN ( $ jsFileName ) ; return '<script type="text/javascript" src="' . $ patternFound [ 1 ] . '"></script>' . $ patternFound [ 2 ] ; }
Returns javascript link to a given file

@param string $jsFileName
@return string
Returns javascript link to a given file