Properties

$methods

$methods :

Type

Methods

__construct()

__construct()

Constructor. Grab some injected dependencies as needed.

help()

help(\apex\app\sys\iterable  $vars)

Display help

Usage: php apex.php help

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

list_packages()

list_packages(mixed  $vars,\apex\app\sys\network  $client)

List all available packages

Usage: php apex.php list_packages

Parameters

mixed $vars

The arguments from the command line.

\apex\app\sys\network $client

The network.php clinet. Injected.

search()

search(\apex\app\sys\iterable  $vars,\apex\app\sys\network  $client)

Search for package(s)

Searches all repositories configured on the system for a package(s) that meet the specified search term. Usage: php apex.php search TERM

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\sys\network $client

The network.php client. Injected.

install()

install(\apex\app\sys\iterable  $vars,\apex\app\pkg\package  $package)

Downloads a package from the repository, and installs it on the system.

Usage: php apex.php install PACAKGE_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\pkg\package $package

The /app/pkg/package.php class. Injected.

scan()

scan(\apex\app\sys\iterable  $vars,\apex\app\pkg\package  $package)

Scan package.php file, update configuration.

Scans the package.php configuration file of a package, and updates the database as necessary. Used during development, when you modify things like config variables, hashes, or menus. Usage: php apex.php scan PACKAGE_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\pkg\package $package

The /app/pkg/package.php class. Injected.

create_package()

create_package(\apex\app\sys\iterable  $vars,\apex\app\pkg\package  $package,\apex\app\sys\network  $client)

Create package.

Creates a new package. Inserts a row into the 'internal_packages' table, and creates the necessary base directories and configuration files. Usage: php apex.php create_package PACKAGE_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\pkg\package $package

The /app/pkg/package.php class. Injected.

\apex\app\sys\network $client

The /app/sys/network.php class. Injected.

delete_package()

delete_package(\apex\app\sys\iterable  $vars)

Delete package.

Delete a package. Removes the package from the current system, please deletes it altogether. Only to be used if you do not plan on developing this package anymore. Usage: php apex.php delete_package PACKAGE

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

publish()

publish(\apex\app\sys\iterable  $vars)

Publish package.

Publishes a package to the appropriate repository, from where it can be instantly installed on other Apex systems. Usage: php apex.php publish PACKAGE_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

create_upgrade()

create_upgrade(\apex\app\sys\iterable  $vars)

Create upgrade point.

Creates a new upgrade point, which is stored in /etc/PACKAGE/upgrades/VERSION/ directory. Takes a SHA1 hash of all files pertaining to the package, which is used to check which files were modified upon publishing the upgrade. Usage: php apex.php create_upgrade PACKAGE ]VERSION]

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

publish_upgrade()

publish_upgrade(\apex\app\sys\iterable  $vars)

Publish upgrade.

Publishes an upgrade to the appropriate repository. Usage: php apex.php publish_upgrade PACKAGE

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

check_upgrades()

check_upgrades(\apex\app\sys\iterable  $vars,\apex\app\sys\network  $client)

Check for upgrades

Usage: php apex.php check_upgrades [PACKAGE]

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\sys\network $client

The /app/sys/network.php class. Injected.

upgrade()

upgrade(\apex\app\sys\iterable  $vars,\apex\app\sys\network  $client,\apex\app\pkg\upgrade  $upgrade_client)

Install upgrades

Usage: php apex.php upgrade [PACKAGE]

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\sys\network $client

The /app/sys/network.php class. Injected.

\apex\app\pkg\upgrade $upgrade_client

The /app/pkg/upgrade.php class. Injected.

create_theme()

create_theme(\apex\app\sys\iterable  $vars)

create a new theme

Usage: php apex.php create_theme ALIAS [AREA]

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

publish_theme()

publish_theme(\apex\app\sys\iterable  $vars)

Publish a theme to a repository.

Usage: php apex.php publish_theme ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

list_themes()

list_themes(\apex\app\sys\iterable  $vars,\apex\app\sys\network  $client)

List all available themes

Usage: php apex.php list_themes

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\sys\network $client

The /app/sys/network.php class. Injected.

install_theme()

install_theme(\apex\app\sys\iterable  $vars)

Download and install a theme

Usage: php apex.php install_theme THEME_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

delete_theme()

delete_theme(\apex\app\sys\iterable  $vars)

Delete theme

Usage: php apex.php delete_theme THEME_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

change_theme()

change_theme(\apex\app\sys\iterable  $vars)

Change theme on an area to another theme.

Usage: php apex.php change_theme AREA THEME_ALIAS

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

create()

create(\apex\app\sys\iterable  $vars)

Create new component.

Creates a new component (eg. htmlfunc, modal, template, lib, etc.) and should be used during development. Do not manually create the files on the server, and instead use this create command to ensure proper records are added to the database for packaging. Usage: php apex.php create TYPE PACKAGE:[PARENT:]ALIAS OWNER php apex.php create template URI OWNER TYPE is the component type (eg. htmlfunc, table, form). PACKAGE is required, and is the package alias the component is being created under. PARENT is only required for the types 'tabpage', 'controller', and 'trigger'. ALIAS is the alias of the new component. OWNER is only required for type 'template', 'trigger', 'controller', and 'tabpage'. This is the package who owns the package, even though the component may reside in another package. URI is only required for 'template', and is the URI of the new template.

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

delete()

delete(\apex\app\sys\iterable  $vars)

Delete components.

Delete a component from the system, including file and records from database. Usage: php apex.php delete TYPE PACKAGE:[PARENT:]ALIAS php apex.php delete template URI

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

debug()

debug(\apex\app\sys\iterable  $vars)

Update session deubbing.

Update the debug variable, telling them system whether or not to save debug information. 0 - Debugging off 1 - Debugging on, but only for next request 2 - Debugging on, do not turn off Usage: php apex.php debug NUM

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

mode()

mode(\apex\app\sys\iterable  $vars)

Change server mode

Change the server mode between development / production, and the debug level Usage: php apex.php mode [devel|prod] [DEBUG_LEVEL]

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

server_type()

server_type(\apex\app\sys\iterable  $vars)

Change server type

Changes the server type, such as whether or not it's an all-in=one, back-end application, messaging, or front-end web server, etc. This simply modifies how messaging via RabbitMQ works. Usage: php apex.php server_type TYPE

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

add_repo()

add_repo(\apex\app\sys\iterable  $vars,\apex\app\sys\network  $client)

Add a new repopository

Adds a new repository into the system, which then begins getting checked when searching for / install packages, themes and upgrades. Usage: php apex.php add_repo URL [USERNAME] [PASSWORD]

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

\apex\app\sys\network $client

The /app/sys/network.php class. Injected.

update_repo()

update_repo(\apex\app\sys\iterable  $vars)

Update a repo with username and password

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

update_masterdb()

update_masterdb(\apex\app\sys\iterable  $vars)

Update master database info

Usage: php apex.php update_masterdb

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

clear_dbslaves()

clear_dbslaves()

Clear all db slave servers

Usage: php apex.php clear_dbslaves

update_rabbitmq()

update_rabbitmq()

Update RabbitMQ info

Usage: php apex.php update_rabbitmq

compile_core()

compile_core(\apex\app\sys\iterable  $vars)

Compile Apex Core

Compiles the core Apex framework. This is generally only needed by the Apex development team, and basically packages Apex to exactly what you see in the Github repository. Usage: php apex.php compile_core

Parameters

\apex\app\sys\iterable $vars

The command line arguments specified by the user.

enable_cache()

enable_cache(\apex\app\sys\iterable  $vars)

Enable the cache

Parameters

\apex\app\sys\iterable $vars

Nothing.

disable_cache()

disable_cache(\apex\app\sys\iterable  $vars)

Disable the cache

Parameters

\apex\app\sys\iterable $vars

Nothing.

git_init()

git_init(  $vars)

Git initialize repo

Will initialize a local Github repository for the specified package within the /src/PACKAGE/git/ directory. This requires a $github_repo_url variable to defined within the package configuration at /etc/PACKAGE/package.php file.

Parameters

$vars

git_sync()

git_sync(  $vars)

Sync local code from GIthub repository.

Downloads the GIthub repository for the specified package into a tmp directory, and copies / updates all local code within the local Apex installation with any newer code.

Parameters

$vars

git_compare()

git_compare(  $vars)

Compare git repos.

Downloads the remote git repo, compares it to the local filesystem, and generates the necessary git.sh file to add all necessary files to the next push / commit, and ensure the git repo is a mirror copy of the local filesystem.

Parameters

$vars

get_repo()

get_repo()

Obtain a repoistory

Get a repository. Lists a list of all repos on the system, and has user choose one.