Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

00f100/fcphp-context

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

00f100/fcphp-context

Context for FcPhp

Source
Packagist
Version
0.1.1
Version published
Maintainers
1
Created
Source

FcPhp Context

Context to FcPhp Application. Autoload Context inside packages with cache using FcPhp Cache and FcPhp Autoload

Build Status codecov Total Downloads

How to install

Composer:

$ composer require 00f100/fcphp-context

or add in composer.json

{
	"require": {
		"00f100/fcphp-context": "*"
	}
}

How to use

<?php
/**
 * Construct instance of Context
 *
 * @param array $context Context to apply
 * @return void
 */
$context = new Context(array $context = []);

Example

<?php

use FcPhp\Context\Context;

$context = [
	'cache' => [
		'file' => 'tests/var/cache',
	]
];

$context = new Context($context);

// Print
// tests/var/cache
echo $context->get('cache.file');

Autoload, update Context and cache

<?php

use FcPhp\Context\Context;
use FcPhp\Autoload\Autoload;
use FcPhp\Cache\Facades\CacheFacade;

$context = [
	'cache' => [
		'file' => 'tests/var/cache',
	]
];

$context = new Context($context);

$vendorPath = 'vendor/*/*/config';
$autoload = new Autoload();
$cache = CacheFacade::getInstance('tests/var/cache');

$context->autoload($vendorPath, $autoload, $cache);

FAQs

Package last updated on 04 Aug 2018

Did you know?

Socket

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.

Install

Related posts