Create the ‘#key’ and ‘#name’ directives for snippets

YASnippet uses these two directives to know when to expand text into
snippets (the key) and what to show on the list of available snippets
(the name).  We use the function name for both.
Actually include the function name in the snippet we generate

Because we don’t want to replace the function name in the Emacs buffer
with only its parameters, erasing the name completely.  What an
idiotic omission on my part.
Implement Elisp code to call our PHP script to create a snippet

This only calls our PHP program and returns the snippet it creates as
a string.  We currently do nothing with that string as far as actually
defining it as a snippet that YASnippet will recognize.
Document how to load the package in the Elisp source

Later we will copy this same information into the README, but a lot of
Emacs users expect to find this kind of information inside Elisp files
so we’ll want it here too.
Add newly defined templates to YASnippet’s php-mode menu

This provides an Elisp function that creates snippets and associates
them with php-mode by registering them with YASnippet’s API.

We had to change the behavior of payas/create-template-string.  It
returns a string but later we want to use yas--define-template to
register the snippet it creates.  The problem is the latter function
expects the new snippet to be in the current buffer, not in a string.
So we change payas/create-template-string so that it puts the snippet
inside of the current buffer instead of returning any value.

With that done we’re able to add a simple function that creates a
temporary buffer—necessary now since payas/create-template-string no
longer does this—and stores the new snippet there, then immediately
reads the snippet from that temporary buffer, registers it with
YASnippet, and destroys the buffer.

With this patch we can execute code like

    (payas/define-template "implode")

to add a useful snippet for implode() to the YASnippet menu of
snippets for php-mode.
Rename payas/create-template-string to payas/create-template

Since the function no longer returns a string it is appropriate to
remove the ‘-string’ suffix from the name.