-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- System
- Classes
- VersionManager
System\Classes\VersionManager
Source: ~/modules/system/classes/VersionManager.php
Version manager
Manages the versions and database updates for plugins.
Protected properties
protected array $notes
The notes for the current operation.
protected Illuminate\Console\OutputStyle $notesOutput
protected $fileVersions
Cache of plugin versions as files.
protected $databaseVersions
Cache of database versions
protected $databaseHistory
Cache of database history
protected October\Rain\Database\Updater $updater
protected System\Classes\PluginManager $pluginManager
protected static $instance
Public methods
public void __clone()
public void __wakeup()
public static void forgetInstance()
Forget this singleton's instance if it exists
public array getNotes()
Get the notes for the last operation.
public static void instance()
Create a new instance of this singleton.
public void listNewVersions($plugin)
Returns a list of unapplied plugin versions.
Parameters
- $plugin
public void purgePlugin(string $pluginCode)
Deletes all records from the version and history tables for a plugin.
Parameters
- string $pluginCode - Plugin code
public void removePlugin($plugin, $stopOnVersion=NULL)
Removes and packs down a plugin from the system. Files are left intact. If the $stopOnVersion parameter is specified, the process stops after the specified version is rolled back.
Parameters
- $plugin
- $stopOnVersion
public self resetNotes()
Resets the notes store.
public self setNotesOutput(Illuminate\Console\Command $output)
Sets an output stream for writing notes.
Parameters
- Illuminate\Console\Command $output
public void updatePlugin($plugin, $stopOnVersion=NULL)
Updates a single plugin by its code or object with it's latest changes. If the $stopOnVersion parameter is specified, the process stops after the specified version is applied.
Parameters
- $plugin
- $stopOnVersion
Protected methods
protected void __construct()
Constructor.
protected void applyDatabaseComment($code, $version, $comment)
Registers a database update comment in the history table.
Parameters
- $code
- $version
- $comment
protected void applyDatabaseScript($code, $version, $script)
Registers a database update script in the history table.
Parameters
- $code
- $version
- $script
protected void applyPluginUpdate($code, $version, $details)
Applies a single version update to a plugin.
Parameters
- $code
- $version
- $details
protected array extractScriptsAndComments($details $details)
Parameters
- $details $details
protected void getDatabaseHistory($code)
Returns all the update history for a plugin.
Parameters
- $code
protected void getDatabaseVersion($code)
Returns the latest version of a plugin from the database.
Parameters
- $code
protected void getFileVersions($code)
Returns all versions of a plugin from its version file.
Parameters
- $code
protected void getLatestFileVersion($code)
Returns the latest version of a plugin from its version file.
Parameters
- $code
protected void getNewFileVersions($code, $version=NULL)
Returns any new versions from a supplied version, ie. unapplied versions.
Parameters
- $code
- $version
protected void getVersionFile($code)
Returns the absolute path to a version file for a plugin.
Parameters
- $code
protected void hasDatabaseHistory($code, $version, $script=NULL)
Checks if a plugin has an applied update version.
Parameters
- $code
- $version
- $script
protected void hasVersionFile($code)
Checks if a plugin has a version file.
Parameters
- $code
protected void init()
protected void note(string $message)
Raise a note event for the migrator.
Parameters
- string $message
protected void removeDatabaseComment($code, $version)
Removes a database update comment in the history table.
Parameters
- $code
- $version
protected void removeDatabaseScript($code, $version, $script)
Removes a database update script in the history table.
Parameters
- $code
- $version
- $script
protected void setDatabaseVersion($code, $version=NULL)
Updates a plugin version in the database.
Parameters
- $code
- $version