protected function validateFiles(array &$library)
    {
        if (empty($library['files'])) {
            return true; // Assume files will be loaded dynamically
        }

        $readable = $count = 0;

        foreach ($library['files'] as &$file) {

            $count++;

            if (!gplcart_path_is_absolute($file)) {
                $file = $library['basepath'] . "/$file";
            }

            $readable += (int) (is_file($file) && is_readable($file));
        }

        return $count == $readable;
    }
protected function validateFiles(array &$library)
    {
        if (empty($library['files'])) {
            return true; // Assume files will be loaded dynamically
        }

        $readable = $count = 0;

        foreach ($library['files'] as &$file) {

            $count++;

            if (!gplcart_path_is_absolute($file)) {
                $file = $library['basepath'] . "/$file";
            }

            $readable += (int) (is_file($file) && is_readable($file));
        }

        return $count == $readable;
    }
protected function validateFiles ( array & $ library ) { if ( empty ( $ library [ 'files' ] ) ) { return true ; // Assume files will be loaded dynamically } $ readable = $ count = 0 ; foreach ( $ library [ 'files' ] as & $ file ) { $ count ++ ; if ( ! gplcart_path_is_absolute ( $ file ) ) { $ file = $ library [ 'basepath' ] . "/$file" ; } $ readable += ( int ) ( is_file ( $ file ) && is_readable ( $ file ) ) ; } return $ count == $ readable ; }
Validates library files
@param array $library
@return bool
Validates library files