
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
00f100/fcphp-command
Advanced tools
Package to manupulate commands of terminal into FcPhp
Composer:
$ composer require 00f100/fcphp-command
or add in composer.json
{
"require": {
"00f100/fcphp-command": "*"
}
}
This package use FcPhp Security Console to manipulate permissions and FcPhp Cache to save commands cache for better performance
use FcPhp\SConsole\SCEntity;
use FcPhp\Command\Interfaces\ICEntity;
use FcPhp\Command\Facades\CommandFacade;
// Instance of SCEntity provider from FcPhp Security Console
// or ...
$entity = new SCEntity();
// Custom commands...
$commands = [];
// Composer dir to autoload find "commands.php" into packages and cache into FcPhp Cache
$vendorPathAutoload = 'vendor/*/*/config';
$instance = CommandFacade::getInstance($entity, $commands, $vendorPathAutoload);
// Args from console request
// Example: php index.php package datasource connect -h localhost -u user -p password
$args = [
'package',
'datasource',
'connect',
'-h',
'localhost',
'-u',
'user',
'-p',
'password'
];
// Return instance FcPhp\Command\Interfaces\ICEntity
$match = $this->instance->match($args);
if($match instanceof ICEntity) {
// Print status code
echo $match->getStatusCode();
// Print action
echo $match->getAction();
// ...
}
<?php
namespace FcPhp\Command\Interfaces
{
interface ICEntity
{
/**
* Method to contruct instance
*
* @param array $params Params to entity
* @return void
*/
public function __construct(array $params = []);
/**
* Method to get command
*
* @return string|null
*/
public function getCommand();
/**
* Method to get action
*
* @return string|null
*/
public function getAction();
/**
* Method to get rule
*
* @return string|null
*/
public function getRule();
/**
* Method to get params to controller
*
* @return array
*/
public function getParams() :array;
/**
* Method to get status code
*
* @return int
*/
public function getStatusCode() :int;
/**
* Method to get status message
*
* @return string|null
*/
public function getStatusMessage();
}
}
FAQs
Library to manipulate console commands into FcPhp
We found that 00f100/fcphp-command demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.