PHP Класс lithium\console\command\Library

In addition, communicate with the a given server to add plugins and extensions to the current application. Push archived plugins to the server.
Наследование: extends lithium\console\Command
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$conf string Absolute path to config file.
$f boolean
$filter string Filter used for including files in archive.
$force string Force operation to complete. Typically used for overwriting files.
$password string The password for corresponding username.
$path string Path to where plugins will be installed. Relative to current working directory.
$port string The port for the server.
$server string Server host to query for plugins.
$username string The username for the server authentication.

Защищенные свойства (Protected)

Свойство Тип Описание
$_autoConfig array Auto configuration properties.
$_classes array some classes
$_settings array Holds settings from conf file

Открытые методы

Метод Описание
archive ( string $name = null, string $result = null ) : boolean Create the Phar::GZ archive from a given directory. If no params, the current working directory is archived with the name of that directory. If one param, the current working directory will be archive with the name provided. If both params, the first is the name or path to the library to archive and the second is the name of the resulting archive
config ( string $key = null, string $value = null, string $options = true ) : void Add configuration and write data in json format.
extract ( string $name = 'new', string $result = null ) : boolean Extract an archive into a path. If one param exists, the app.phar.gz template will be used.
find ( string $type = 'plugins' ) : void List all the plugins and extensions available on the server.
formulate ( string $name = null ) : boolean Create a formula for the given library name
install ( string $name = null ) : boolean Install plugins or extensions to the current application.
push ( string $name = null ) : void Send a plugin archive to the server. The plugin must have a formula.
update ( ) : boolean Update installed plugins. For plugins, runs update commands specified in Formula.

Защищенные методы

Метод Описание
_init ( ) : void Initialize _settings from --conf.
_toPath ( string $name = null ) : string Take a name and return the path.

Описание методов

_init() защищенный Метод

Throws an exception if the command is initialized without a request object which is needed by _toPath() in order to determine the current working directory. This most often happens if the command is inspected using the ReflectionClass.
protected _init ( ) : void
Результат void

_toPath() защищенный Метод

Take a name and return the path.
protected _toPath ( string $name = null ) : string
$name string
Результат string

archive() публичный Метод

li3 library archive my_archive : archives current working directory to my_archive.phar.gz li3 library archive myapp my_archive : archives 'myapp' to 'my_archive.phar.gz'
public archive ( string $name = null, string $result = null ) : boolean
$name string if only param, the archive name for the current working directory otherwise, The library name or path to the directory to compress.
$result string if exists, The name of the resulting archive
Результат boolean

config() публичный Метод

Add configuration and write data in json format.
public config ( string $key = null, string $value = null, string $options = true ) : void
$key string (server)
$value string value of key
$options string [optional]
Результат void

extract() публичный Метод

If both parameters exist, then the first will be the template archive and the second will be the name of the extracted archive li3 library extract myapp : uses the command/create/template/app.phar.gz li3 library extract another_archive myapp li3 library extract plugin li3_plugin : uses the command/create/template/plugin.phar.gz
public extract ( string $name = 'new', string $result = null ) : boolean
$name string if only param, command/create/template/app.phar.gz extracted to $name otherwise, the template name or full path to extract `from` phar.gz.
$result string if exists $name is extracted to $result
Результат boolean

find() публичный Метод

List all the plugins and extensions available on the server.
public find ( string $type = 'plugins' ) : void
$type string plugins|extensions
Результат void

formulate() публичный Метод

Create a formula for the given library name
public formulate ( string $name = null ) : boolean
$name string the library name or full path to the plugin
Результат boolean

install() публичный Метод

For plugins, the install commands specified in the formula is run.
public install ( string $name = null ) : boolean
$name string name of plugin to add
Результат boolean

push() публичный Метод

Send a plugin archive to the server. The plugin must have a formula.
public push ( string $name = null ) : void
$name string the library name or full path to the archive to send
Результат void

update() публичный Метод

Update installed plugins. For plugins, runs update commands specified in Formula.
public update ( ) : boolean
Результат boolean

Описание свойств

$_autoConfig защищенное свойство

Auto configuration properties.
protected array $_autoConfig
Результат array

$_classes защищенное свойство

some classes
protected array $_classes
Результат array

$_settings защищенное свойство

Holds settings from conf file
protected array $_settings
Результат array

$conf публичное свойство

Absolute path to config file.
public string $conf
Результат string

$f публичное свойство

public bool $f
Результат boolean

$filter публичное свойство

Filter used for including files in archive.
public string $filter
Результат string

$force публичное свойство

Force operation to complete. Typically used for overwriting files.
public string $force
Результат string

$password публичное свойство

The password for corresponding username.
public string $password
Результат string

$path публичное свойство

Path to where plugins will be installed. Relative to current working directory.
public string $path
Результат string

$port публичное свойство

The port for the server.
public string $port
Результат string

$server публичное свойство

Server host to query for plugins.
public string $server
Результат string

$username публичное свойство

The username for the server authentication.
public string $username
Результат string