Skip to content

lingtalfi/KrankenStein

Repository files navigation

KrankenStein

2019-04-02 -> 2021-03-05

A tool to help with php method call notations.

This is part of the universe framework.

Install

Using the planet installer via light-cli

lt install Ling.KrankenStein

Using the uni command.

uni import Ling/KrankenStein

Or just download it and place it where you want otherwise.

Summary

One shot notation

The one shot notation allows us to call a php static method or a php non-static method in one line.

The arguments are written using the BabyYaml inline notation.

Example #1: static call

$str = "Ling\Deploy\Helper\EasyConsoleMenuHelper::myMethod(arg1, arg2, [one, two], 'boris')";
$result = KrankenSteinTool::executeOneShot($str);

Example #2: non-static call

$str = "My\Class->myMethod(arg1, arg2, [one, two], 'boris')";
$result = KrankenSteinTool::executeOneShot($str);

Example #3: is it a one shot string?

$str = "Ling\Deploy\Helper\EasyConsoleMenuHelper::myMethod(arg1, arg2, [one, two], 'boris')";
a(KrankenSteinTool::isOneShot($str)); // true

History Log

  • 1.0.5 -- 2021-05-31

    • Removing trailing plus in lpi-deps file (to work with Light_PlanetInstaller:2.0.0 api
  • 1.0.4 -- 2021-03-05

    • update README.md, add install alternative
  • 1.0.3 -- 2020-12-08

    • Fix lpi-deps not using natsort.
  • 1.0.2 -- 2020-12-04

    • Add lpi-deps.byml file
  • 1.0.1 -- 2019-07-18

    • update docTools documentation, add links to source code for classes and methods
  • 1.0.0 -- 2019-04-02

    • initial commit

About

A tool to help with php method call notations.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages