protected function verifyDirectoryExistence($base, $cacheDir)
    {
        if (is_dir("$base/$cacheDir")) {
            return;
        }

        $folder_path = explode('/', $cacheDir);
        foreach ($folder_path as $element) {
            $base .= '/' . $element;
            if (!is_dir($base)) {
                mkdir($base, 0755, true);
                chmod($base, 0755);
            }
        }
    }
protected function verifyDirectoryExistence($base, $cacheDir)
    {
        if (is_dir("$base/$cacheDir")) {
            return;
        }

        $folder_path = explode('/', $cacheDir);
        foreach ($folder_path as $element) {
            $base .= '/' . $element;
            if (!is_dir($base)) {
                mkdir($base, 0755, true);
                chmod($base, 0755);
            }
        }
    }
protected function verifyDirectoryExistence ( $ base , $ cacheDir ) { if ( is_dir ( "$base/$cacheDir" ) ) { return ; } $ folder_path = explode ( '/' , $ cacheDir ) ; foreach ( $ folder_path as $ element ) { $ base .= '/' . $ element ; if ( ! is_dir ( $ base ) ) { mkdir ( $ base , 0755 , true ) ; chmod ( $ base , 0755 ) ; } } }
Create the folder containing the cached images if it doesn't exist

@param $base
@param $cacheDir
Create the folder containing the cached images if it doesn t exist