PHPackages                             geeh/snubbed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. geeh/snubbed

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

geeh/snubbed
============

Generate snub class to get code completion for ZF2 in your favourite IDE

10272[1 issues](https://github.com/GeeH/Snubbed/issues)PHP

Since Jun 10Pushed 10y ago2 watchersCompare

[ Source](https://github.com/GeeH/Snubbed)[ Packagist](https://packagist.org/packages/geeh/snubbed)[ RSS](/packages/geeh-snubbed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

> **ALPHA!!!**

Snubbed
=======

[](#snubbed)

Create Snubs of Zend Framework 2 projects to make IDE integration much tighter

Installing
==========

[](#installing)

- Add `"geeh/snubbed": "dev-master"` to you `composer.json` and `composer update`

Running
=======

[](#running)

- use `php vendor/bin/snub.php  ` - you can leave the parameters blank and it will default to `config/application.config.php` and `Zend\Mvc\Controller\AbstractActionController` which should be good enough for a standard skeleton application based projects
- you'll see the Snubs created in the `.ide` folder in the root of your project

Using
=====

[](#using)

Controllers
-----------

[](#controllers)

- update your use statement where you import the basic controller in your controllers to use the Snubbed controllers instead - use the `as` keyword to make it seamless is recommended:

```
namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class IndexController extends AbstractActionController
{
    public function indexAction()
    {
        return new ViewModel();
    }
}
```

Becomes:

```
namespace Application\Controller;

use Snub\SnubbedZendMvcControllerAbstractActionController as AbstractActionController;
use Zend\View\Model\ViewModel;

class IndexController extends AbstractActionController
{
    public function indexAction()
    {
        return new ViewModel();
    }
}
```

You'll now have code completion in your controllers, including any controller plugins:

[![Screenshot](https://camo.githubusercontent.com/54faec095b26d465308acb1786628d5bb0f5d02180ff36c751c549fd83f0ae03/687474703a2f2f632e686f636b2e696e2f3663316333352e706e67)](https://camo.githubusercontent.com/54faec095b26d465308acb1786628d5bb0f5d02180ff36c751c549fd83f0ae03/687474703a2f2f632e686f636b2e696e2f3663316333352e706e67)

Views
-----

[](#views)

Snubbed will also generate view snubs that give you code completion in the view, including your view helpers and view variables for each view. In the `.ide/Snub/View` directory, you'll find a `class_map.php` that will tell you which Snub you should use for each view template. You'll see that it's straightforward, and you'll soon be able to predict the filename.

To use the view Snubs, simply include an `@var` docblock at the beginning of your view file. Assuming your controller is:

```
class IndexController extends AbstractActionController
{
    public function indexAction()
    {
        return new ViewModel(
            ['form' => new Form()]
        );
    }
}
```

Then in your view (in this case `view\application\index\index.phtml`), simply add the following under an opening `
```

Obviously, you need to replace the Snub class name with the classname that is suitable for this view file. You'll then get code completion in the view, including the view variables that you set in the action:

[![Screenshot](https://camo.githubusercontent.com/e48a4c4200fcb73e31105e5e7fa71a424edc2fd289cad4b3136a868ceef7a00e/687474703a2f2f632e686f636b2e696e2f3764386461302e706e67)](https://camo.githubusercontent.com/e48a4c4200fcb73e31105e5e7fa71a424edc2fd289cad4b3136a868ceef7a00e/687474703a2f2f632e686f636b2e696e2f3764386461302e706e67)

> Note: There are some known problems at the moment that stop variable completion from happening. If, for example, your controller is protected by RBAC or ZfcUser authentication, then Snubbed won't be able to dispatch the controller from the command line, and therefore won't be able to analyise the output.

Helping
=======

[](#helping)

At this moment, the code is terrible, untested, but actually works. If you find there are errors in using this then **please** submit issues here so I can try and get them fixed. **PLEASE PLEASE PLEASE**

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8487c492ae47dd2f39abf44878226a7a49e053792c0a0cdf56359e0977704ffa?d=identicon)[GeeH](/maintainers/GeeH)

---

Top Contributors

[![GeeH](https://avatars.githubusercontent.com/u/613376?v=4)](https://github.com/GeeH "GeeH (26 commits)")[![Danielss89](https://avatars.githubusercontent.com/u/632956?v=4)](https://github.com/Danielss89 "Danielss89 (1 commits)")

### Embed Badge

![Health badge](/badges/geeh-snubbed/health.svg)

```
[![Health](https://phpackages.com/badges/geeh-snubbed/health.svg)](https://phpackages.com/packages/geeh-snubbed)
```

###  Alternatives

[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[mpociot/vat-calculator

EU VAT calculation, the way it should be.

1.3k3.9M18](/packages/mpociot-vat-calculator)[czproject/git-php

Library for work with Git repository in PHP.

5544.9M81](/packages/czproject-git-php)[typo3/cms-sys-note

TYPO3 CMS System Notes - Records with messages which can be placed on any page and contain instructions or other information related to a page or section.

115.9M31](/packages/typo3-cms-sys-note)[dg/composer-backslasher

Composer plugin that speeds up your application by adding backslashes to all PHP internal functions and constants.

4117.8k](/packages/dg-composer-backslasher)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
