Skip to content

Instantly share code, notes, and snippets.

@xemoe
Last active April 11, 2016 18:07
Show Gist options
  • Save xemoe/52ba33c60fff1ff21fbabf7e10db5ce2 to your computer and use it in GitHub Desktop.
Save xemoe/52ba33c60fff1ff21fbabf7e10db5ce2 to your computer and use it in GitHub Desktop.
Draft update xemoe/php 1.1.0

Draft

Definitions of Env and Configurations properties.

  1. Configuration properties is REPLACED magic values used inside classes.
  2. Env properties is arguments for any configurations properties, E.g. app_path().

Abstracts

  • Xemoe/Contracts/EnvLoaderContract

    interface EnvLoaderContract
    {
      loadEnv(array $env);
      loadFileEnv($filepath);
      getEnv();
    }
  • Xemoe/Contracts/LoggingContainerContract

    interface LoggingContainerContract
    {
      setLogger(LoggerInterface $logger);
      getLogger();
    }
  • Xemoe/Contracts/CachingContainerContract

    interface CachingContainerContract
    {
      setCache(CacheItemPoolInterface $cacher);
      getCache();
    }
@xemoe
Copy link
Author

xemoe commented Apr 10, 2016

Example getMenuArray() result

$menu = [
    'overview' => ['label' => 'Overview', 'active' => false, 'link' => '/', 'child' => []],
    'rawlog' => ['label' => 'Log Archive', 'active' => false, 'link' => false, 'child' => [
        'rawlog.syslog' => ['label' => 'Syslog', 'active' => false, 'link' => 'raw/syslog',],
        'rawlog.mail' => ['label' => 'Mail', 'active' => true, 'link' => 'raw/mail',],
    ]],
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment