4

Are functions of an extension fetch-able for an IDE like PHPStorm when they are given path to php.ini file of extension folder path? I saw that EasyPHP list functions of an extension beside it for those extension that are delivered with it, but it do not display any function for Yaf and Phalcon that is manually installed.

1
  • "Are functions of an extension fetch-able..." -- NO -- IDE will know nothing about it unless stub files provided by somebody (be it PhpStorm itself, creator/developer of such PHP extension or some 3rd party person/company). This applies to any PHP IDE/Editor. Commented Oct 11, 2012 at 13:31

4 Answers 4

4

For Phalcon -- get yourself Phalcon Developer Tools ( http://phalconphp.com/download ) -- it contains stub files that can be used by IDE for code completion: https://github.com/phalcon/phalcon-devtools/tree/master/ide/phpstorm

For Yaf -- similar approach (stub file for usage inside IDE): https://github.com/suin/phpstorm-yaf-doc

Sign up to request clarification or add additional context in comments.

Comments

1

As this frameworks are php extensions, just make sure, you have configured you php include path in IDE right.

config -> PHP -> and add there something like /usr/share/php (your location)

Comments

1

I use the stubs provided on packagist and install them with composer. https://packagist.org/packages/sneakybobito/phalcon-stubs

composer.json

{
    "require": {
        "sneakybobito/phalcon-stubs": "1.2.3"
    }
}

Comments

0

For compiled extensions you will need a stub file which contains the name of the functions. Since recent versions of PHP include reflection capabilities for extensions[you can get the extension defined classes and functions and then reflect them to get their parameters] they should be possible to generate them.

I'm giving https://github.com/schmittjoh/php-stubs a try but the PHP svn server is down at the moment so it won't run... Will try to check back here later and update on if it works.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.