simpletree/yii2phpconsole

Php-console extension for Yii 2.

dev-master 2013-11-19 16:52 UTC

This package is not auto-updated.

Last update: 2024-11-09 17:14:13 UTC


README

Php Console extension for Yii2 https://github.com/barbushin/php-console

Installation

composer.json

{
  "require": {
      "simpletree/yii2phpconsole": "dev-master"
  }
}

config/main.php

  'preload' => ['phpconsole'],
  ...
  'components' => [
    ...
    'phpconsole' => [
        'class' => '\Simpletree\Phpconsole\Phpconsole',
        'registerGlobal' => true,   //optional, defaults to true
        'password' => '1234'        //optional, defaults to '1234'
    ],
    ...
  ]

Usage

With globals

PC::debug($var, 'tag');
PC::tag($var);

Without globals

PhpConsole\Handler::getInstance()->debug($var, 'some.tags');