2017 © Pedro Peláez
 

library plain-php

Support for plain PHP script file

image

lapaz/plain-php

Support for plain PHP script file

  • Friday, February 16, 2018
  • by tanakahisateru
  • Repository
  • 2 Watchers
  • 1 Stars
  • 135 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PlainPhp

Build Status, (*1)

Plain PHP script file runner that safer than extract() and require way., (*2)

Quick Start

To load these config-file.php script:, (*3)

<?php
/* @var $this SomeObject */

return [
    // your config
    'some-element' => $parameter,
    'another-element' => $anotherParameter,
    'element-by-method-call' => $this->getConfigElement(),
];

Use ScriptRunner below instead of raw require statement., (*4)

$config = ScriptRunner::which()->requires('path/to/config-file.php')->with([
    'parameter' => '...',
    'anotherParameter' => '...',
])->binding($someObject)->run();

Features

  • Closed and safer evaluation than raw require or include
  • Binding any object as $this variable in target file
  • Immutable and branchable variable bound context

The Versions

16/02 2018

dev-master

9999999-dev

Support for plain PHP script file

  Sources   Download

MIT

The Requires

  • php ^5.6||^7.0

 

The Development Requires

16/02 2018

0.1.1

0.1.1.0

Support for plain PHP script file

  Sources   Download

MIT

The Requires

  • php ^5.6||^7.0

 

The Development Requires

16/05 2017

0.1.0

0.1.0.0

Support for plain PHP script file

  Sources   Download

MIT

The Requires

  • php ^5.6||^7.0

 

The Development Requires