2017 © Pedro Peláez
 

library phalcon-console

Phalcon Ajax Console

image

vanchelo/phalcon-console

Phalcon Ajax Console

  • Saturday, October 17, 2015
  • by vanchelo
  • Repository
  • 4 Watchers
  • 14 Stars
  • 802 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Phalcon Console

Adapted by Phalcon https://github.com/darsain/laravel-console - Laravel 4 Console, (*1)

AJAX console to execute PHP code in the browser with light, the ability to save the last code execution, limited access by IP address, (*2)

Example, commissioning editor, click Execute [Ctrl + Enter], (*3)

$user = Users::findFirst(1);

echo $user->name;

Result, (*4)

vanchelo

Installation

Install the latest stable version using composer:, (*5)

composer require vanchelo/phalcon-console

Copy and paste:

  • Copy the contents of a folder to any directory
  • Register your autoloader namespace Vanchelo\Console
// $loader = new Loader();

$loader->registerNamespaces([
    'Vanchelo\Console' => __DIR__ . '/../library/console/src/', // The path may be different
]);
  • Copy the contents of folders in your public folder accessible from public WEB
  • Add Services
/**
 * Register Console Service
 */
new Vanchelo\Console\ConsoleService($di);
  • Add to the list of allowed IP addresses in the src/config/config.php
/* ... */
'whitelist' => [
    '127.0.0.1',
    '::1'
],
/* ... */

Everything! The console must be available at http://site.com/phalcon-console, (*6)

As in the console are available all the services and service, (*7)

Your settings

To specify your settings console, you must: - Create a configuration file in a convenient location, such as this content, (*8)

<?php
// app/config/console-config.php
return new \Phalcon\Config([
    // If you want to specify the class test access rights to the console
    'check_access_class' => 'MyConsoleAccessCheck',

    // Check the permissions on the IP
    'check_ip' => false, // disable scanning by IP address
]);
  • Sign-up in the container service settings console to initialize the service console
$di['console.config'] = function ()
{
    // Path to correct its
    $config = require '/path/to/console-config.php';

    return $config;
};

new \Vanchelo\Console\ConsoleService($di);

For more precise information about the time of initializing the console and run the code, you must file index.php in your application to add to the rest of the code mark. line:, (*9)

define('PHALCONSTART', microtime(true));

It should look something like this:, (*10)

<?php
// public/index.php
define('PHALCONSTART', microtime(true));

A couple of screenshots Console Before Execute Console After Execute, (*11)

The Versions

17/10 2015

dev-master

9999999-dev https://github.com/vanchelo/phalcon-console

Phalcon Ajax Console

  Sources   Download

GPLv2

The Requires

  • php >=5.4.0

 

The Development Requires

development console ajax phalcon

17/10 2015

v1.0.2

1.0.2.0 https://github.com/vanchelo/phalcon-console

Phalcon Ajax Console

  Sources   Download

GPLv2

The Requires

  • php >=5.4.0

 

The Development Requires

development console ajax phalcon

10/10 2015

v1.0.1

1.0.1.0 https://github.com/vanchelo/phalcon-console

Phalcon Ajax Console

  Sources   Download

GPLv2

The Requires

  • php >=5.4.0

 

The Development Requires

development console ajax phalcon

10/10 2015

v1.0.0

1.0.0.0 https://github.com/vanchelo/phalcon-console

Phalcon Ajax Console

  Sources   Download

GPLv2

The Requires

  • php >=5.4.0

 

The Development Requires

development console ajax phalcon