承接 vanchelo/phalcon-console 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vanchelo/phalcon-console

最新稳定版本:v1.0.2

Composer 安装命令:

composer require vanchelo/phalcon-console

包简介

Phalcon Ajax Console

README 文档

README

Adapted by Phalcon https://github.com/darsain/laravel-console - Laravel 4 Console

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

Example, commissioning editor, click Execute [Ctrl + Enter]

$user = Users::findFirst(1);

echo $user->name;

Result

vanchelo

Installation

Install the latest stable version using composer:

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

As in the console are available all the services and service

Your settings

To specify your settings console, you must:

  • Create a configuration file in a convenient location, such as this content
<?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:

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

It should look something like this:

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

A couple of screenshots Console Before Execute Console After Execute

统计信息

  • 总下载量: 1.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 5
  • Forks: 4
  • 开发语言: CSS

其他信息

  • 授权协议: GPLv2
  • 更新时间: 2014-01-16