Is it possible to use WP-CLI via PHP-framework?
- I have Zend framework 2 application (PHP), via which I want to use WP-CLI functionality. near Zend project I have WordPress project, which I want to maintain from Zend via WP-CLI.
- I see in the docs that WP-CLI also written on PHP. I dreamed that I install WP-CLI via composer in root of my project and can use its classes there.
- After installing via composer in WP-CLI's sources I see functions from WordPress (like as is_multisite and etc) and I little disappointed :).
main question: Can I in some way use WP-CLI sources directly from my Zend-project without calling commands via terminal? for example (in abstract programming language):
$command = new WP_CLI::command('command_name subcommand_name', $params, $assoc_params, .....);
$result = $command-execute();
Or WP-CLI was made only as part of the WordPress project as way for extending it's commands and it is unable to use them as I am trying?
Topic framework wp-cli customization Wordpress
Category Web