private function writePreferences(array $preferences)
    {
        // assume result true
        $result = true;

        if (Doozr_Kernel::RUNTIME_ENVIRONMENT_CLI !== self::$runtimeEnvironment) {

            // iterate over storages and try to reconstruct the previously stored preferences
            foreach (self::$storages as $storage) {
                // construct method-name for current storage
                $method = 'write'.ucfirst($storage);

                // try to get preferences from storage
                $result = $result && $this->{$method}($preferences);
            }
        }

        // successfully retrieved
        return $result;
    }