Show:

Q_Plugin Class

Module: Q

Plugins manager

Methods

checkPermissions

(
  • $files_dir
  • $options
)
private static

Parameters:

  • $files_dir String
  • $options Array

checkTree

(
  • $root
  • $filemode
  • $dirmode
  • [$gid=false]
  • [$ask=true]
)
Boolean private static

Parameters:

  • $root String
  • $filemode Integer
  • $dirmode Integer
  • [$gid=false] String | Integer | False optional
  • [$ask=true] Boolean optional

Returns:

Boolean:

fixPermissions

(
  • $file
  • $mode
  • [$gid=false]
  • [$ask=true]
)
Boolean private static

Parameters:

  • $file String
  • $mode Integer
  • [$gid=false] String | Integer | False optional
  • [$ask=true] Boolean optional

Returns:

Boolean:

getPasword

(
  • $conn_name
  • [$stars=false]
)
String private static

Get password for connection

Parameters:

  • $conn_name String
  • [$stars=false] Boolean optional

Returns:

String:

getUsersStreams

() static

Get list of users specified streams (Streams/onInsert/Users_User) installed. To compare with config data and decide whether need to install new streams.

Returns:

array

handleExtra

(
  • $name
  • $type
  • $conn_name
  • $options
)
static

Get or set extra column from [plugin_name]_Q_plugin or [app_name]_Q_app tables Also check whether this column exist, and create if not.

Parameters:

  • $name String

    The name of application or plugin

  • $type String

    One of 'app' or 'plugin'

  • $conn_name String

    The name of the connection to affect

  • $options Array

    Contain data parsed from command line

    • extra Array

Returns:

array List of installed stream names

installApp

(
  • $options
)
static

Parameters:

  • $options Array

installPlugin

(
  • $plugin_name
  • $options
)
static

Parameters:

  • $plugin_name String
  • $options Array

installSchema

(
  • $base_dir
  • $name
  • $type
  • $conn_name
  • $options
)
static

Install or update schema for app or plugin

Parameters:

  • $base_dir String

    The directory where application or plugin is located

  • $name String

    The name of application or plugin

  • $type String

    One of 'app' or 'plugin'

  • $conn_name String

    The name of the connection to affect

  • $options Array

    Contain data parsed from command line

prepare

() private static

Connect Qbix platform if it's not already connected and set up constants

setUsersStreams

(
  • $streamsList
)
static

Set list of users specified streams (Streams/onInsert/Users_User) installed.

Parameters:

  • $streamsList Array

    array of streams list installed.

Returns:

array Result extra

Events

Q/Plugin/install

Before

Event Payload:

  • $app_dir String

    the directory where the app is installed

  • $plugin_name String

    the name of the plugin

  • $options Array

    options passed to the installPlugin method

Q/Plugin/install

After

Event Payload:

  • $app_dir String

    the directory where the app is installed

  • $plugin_name String

    the name of the plugin

  • $options Array

    options passed to the installPlugin method

Q/Plugin/installSchema

Before

Event Payload:

  • $base_dir String

    The directory where application or plugin is located

  • $name String

    The name of application or plugin

  • $type String

    One of 'app' or 'plugin'

  • $conn_name String

    The name of the connection to affect

  • $options Array

    Contain data parsed from command line

  • $shard String
  • $shard_data Array
  • $new_version String
  • $current_version String
  • $script String

    The script to execute