prune-mazui/zephir-ide-helper

Generate php code completion file from zephir file(.zep).

1.2 2017-11-15 09:45 UTC

This package is not auto-updated.

Last update: 2024-04-14 03:14:24 UTC


README

Build Status Coverage Status

Generate php code completion file from zephir file(.zep).

The code completion file is valid in the IDE (ex. PHPStorm).

Example

Zephir Code

namespace PruneMazui\ZephirSample;

/**
 * Sample class Greeting
 */
class Greeting
{
    protected message = "hello world" { set, toString };

    /**
     * constructor
     *
     * @param string optional message
     */
    public function __construct(string message = null)
    {
        if message !== null {
            let this->message = message;
        }
    }

    /**
     * Output Message to stdout
     */
    public function say()
    {
        echo this->message;
    }
}

Generate PHP Code

<?php
namespace PruneMazui\ZephirSample
{
    /**
     * Sample class Greeting
     */
    class Greeting
    {
        protected $message;

        public function setMessage($message)
        {}

        public function __toString()
        {}

        /**
         * constructor
         *
         * @param string optional message
         */
        public function __construct(string $message = null)
        {}

        /**
         * Output Message to stdout
         */
        public function say()
        {}
    }
}

Requirements

Installation

composer require prune-mazui/zephir-ide-helper

Usage

vendor/bin/zephir-ide-helper [-option] target

Arguments

target

Specify the Zephir file or directory.
If you specify a directory, read the directory recursively and look for the Zephir file.

-option

  • -f(--file) ... Specify the PHP file name to output(Default: __zephir_ide_helper.php).

Licence

MIT