Tobiasz Cudnik

Scripts plugin for phpQuery

In phpQuery on 05.10.2008 at 3:05

Scripts plugin is an easy file includer. Each script file have 4 variables in scope:

  • $self Represents $this
  • $params Represents parameters passed to script() method (without script name)
  • $return If not null, will be used as method result
  • $config Content of __config.php file

Possible use cases

  • Authorizations
  • Custom Chains
  • Simple phpQuery plugins
  • Sort functions
  • Website APIs
  • Event binding groups

Example

$return = $self->find($params[0]);

Actually there is only one script which is Google Login. It doesn’t support GMail yet, unfortunately.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.