Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Jones:
Atlas 3.x (“Cassini”) and PHPStorm Completion
May 15, 2018 @ 16:15:05

Paul Jones has a new post to his site showing how, on an ORM library he's been working on, he enhanced it to make PHPStorm autocompletion work better.

I’m proud to announce the release of Atlas.Orm 3.0.0-beta1, along with releases of the supporting Mapper, Table, Cli, and tagged: phpstorm autocomplete tutorial atlasorm package

Link: http://paul-m-jones.com/archives/6885

Rob Allen:
Autocomplete Composer script names on the command line
May 15, 2017 @ 14:43:22

Rob Allen has a quick new post with a handy script you can use to auto-complete Composer script names on the command line (for bash).

As I add more and more of my own script targets to my composer.json files, I find that it would be helpful to have tab autocomplete in bash. I asked on Twitter and didn't get an immediate solution and as I had already done something similar for Phing, I rolled up my sleeves and wrote my own.

He created the bash completion file where Bash could locate it (a special "bash_completion.d" directory). He includes the code you'll need to have in the bash script and briefly explains how each line works. He also includes an example of the output showing how the script catches both the built-in and custom commands as auto-complete options.

tagged: autocomplete composer script bash commandline tutorial

Link: https://akrabat.com/autocomplete-composer-script-names-on-the-command-line/

Procurios Tech Blog:
Autocompleting a lot of parameters
Oct 16, 2013 @ 16:14:05

Pim Elshoff has a recent post on the Procurios tech blog looking at autocompletion on function calls and an alternative to the "too many parameters" problem.

Some methods have many parameters. Sometimes they start out like that, sometimes they grow like that over time. Even though a maximum of two parameters is preferable, configuration for a method that does a big thing is difficult. Take curl for example; curl has a lot of options and so several wrappers around curl have arisen to deal with configuring it in a more humane manner. How can we keep the clutter of many parameters as low as possible, while maintaining autocompletion?

He gives an example of a function that takes too many arguments and how it's difficult to read (and remember the right order/types to give). He does mention one way that's sometimes used - arrays - but you lose typing checks with that. His best recommendation is to use a fluent interface instead. Not only does it make it more readable but it also works with the autocompletion in most IDEs.

tagged: autocomplete parameters suggestion array fluent interface

Link: http://tech.procurios.nl/archief/2013/10/11/Autocompleting-a-lot-of-parameters

Zumba Engineering Blog:
Creating bash completion to your console application
Aug 21, 2012 @ 14:47:52

On the Zumba Engineering blog there's a new post showing you how to implement bash shell "autocomplete" with a special option for a second argument.

This weekend I saw the bash completion for CakePHP from Andy Dawson and had an idea to do the same for our service application, because we frequently forget the exactly job class or method name and add extra steps to verify these names before execute the job. I read his code, made some research and finally get our bash completion working fine.

In his case he wanted to see what things a module in the application had to offer, so he implemented a "__check__" argument that looked at the third argument and used reflection to get the methods allowed for it. Also included in the post is the bash alias you'll need to set up to get it working (and where to put it to make it cooperate).

tagged: bash autocomplete console tutorial reflection

Link:

DZone.com:
2 years of Vim and PHP distilled
Apr 06, 2012 @ 14:50:35

On DZone.com there's a new post from Giorgio Sironi with some of his tips for PHP developers that want to use VIM in their development - some handy tricks to help make you a more effective developer.

In the case of PHP development, you'll need to add some configuration and plugins to speed up your activities. Most of the responsibilities of an IDE - like testing and version control - are outsourced to the terminal while running Vim; however, there are some tweaks that make writing and editing code faster, along with aiding in discovery classes and methods in a PHP codebase.

He includes settings for your .vimrc to detect and load the right PHP functionality, using Command-T, functionality for autocompletion and the snipMate plugin for managing and using reusable code snippets.

tagged: vim editor tips vimrc commandt snipmate autocomplete

Link:

Script-Tutorials.com:
Autocomplete with PHP, jQuery, MySQL and XML
Oct 12, 2011 @ 13:54:40

In this new tutorial from Script-Tutorials.com they show you how to combine PHP, jQuery, MySQL and XML to create an auto-complete box with drop-down suggestions.

Today I have new article for PHP. I will tell you about implementation autocomplete for your sites. Data can be located in different sources - directly in the JS code, in the database, and even in the XML file.

All of the code and markup you'll need is included - the HTML for the page containing the field, CSS to style it, the Javascript (jQuery) to make the field work and the SQL/PHP/XML for the backend. You can check out a live demo of the script in action here or download the source in a single package and get started.

tagged: tutorial xml jquery javascript autocomplete mysql dropdown

Link:

Martin Sikora's Blog:
Google Chrome Extension: PHP Ninja Manual
Jul 08, 2011 @ 14:38:23

In a new post today Martin Sikora has points out a Google Chrome extension he's created that lets you view some of the basics of the PHP manual without leaving the browser.

Finally, I released my extension for Google Chrome called PHP Ninja Manual (Ninja - because I like Avinash Kaushik'sblog and he always call people who are very skilled in something as "Ninjas"). I was always lazy to open PHP documentation every time I had to look at some method definition and its parameters so I made this extension which is actually preparsed official PHP manual available instantly in a popup window.

You can see a screenshot of it in action here including the auto-complete searching and the example of the function's summary details. If you try it out and have feedback, go over to the forum for it and leave your comments.

tagged: chrome extension google manual autocomplete search

Link:

Gonzalo Ayuso's Blog:
Building an ORM with PHP
Sep 13, 2010 @ 17:44:14

In this new post to his blog Gonzalo Ayuso looks at building an ORM (don't worry, he recommends something like Doctrine first) as an exercise to understand how they're constructed and how one could fit his goals.

What’s the motivation for me to build this ORM? The answer is a bit ambiguous. I like SQL. It allows us to speak with the database in a very easy way. [...] So the idea I figured out was to create a set of classes based on my tables, in a similar way than traditional ORMs to help me to autocomplete the fields and table names.

He creates a simple example with a "test" table with three columns with a mapped class (in the "Orm" namespace) that will allow IDEs to follow down the path to fetch the data from the "id", "field1" and "field3" columns. The complete code listing for his example is at the end of the post - PHP 5.3 friendly, of course. Some trigger and scaffolding examples are also included.

tagged: orm tutorial example database doctrine autocomplete

Link:

ZendCasts.com:
Autocomplete Control with ZendX_JQuery
Jul 27, 2010 @ 14:48:57

New from ZendCasts.com today there's a new screencast taking their integration of jQuery with the Zend Framework to the next level - creating an autocomplete control.

In the last video, I discussed ZendX_JQuery integration. Now we’re going to take it a step further by developing our own jQuery autocomplete control, using a country list, PHP 5.3 and anonymous functions.

You can watch the video via the in-page player and you can download either a copy of just the project or browse the whole repository for this and other projects.

tagged: zendcast screencast autocomplete jquery zendxjquery zendframework tutorial

Link:

Matt Curry's Blog:
Programming CakePHP Apps with Komodo IDE
Feb 26, 2009 @ 16:27:16

For those Komodo users that are working with CakePHP and have thought "there has to be a better way", Matt Curry has created a screencast showing a few helpful hints on developing in popular IDE.

I suck at screencasts; I know this. If I keep doing them, I’m bound to get better, right? Is it possible to get worse at something the more you do it? Anyway, I made a quick screencast showing off some CakePHP features with Komodo IDE. Leave a comment with your favorite CakePHP related IDE trick.

He talks about the "automatic" auto-completion the IDE can do once its scanned the CakePHP source, how Komodo knows about properties in the classes as well as helpers and how to set up the Bake and Cake commands as shortcuts for quick access.

tagged: cakephp komodo ide tip autocomplete screencast property bake cake

Link:


Trending Topics: