-
Notifications
You must be signed in to change notification settings - Fork 1
Home
epicwhale edited this page Jul 11, 2012
·
26 revisions
DrupalConnect is a PHP 5.3+ library to connect your application to Drupal using the Services 3.0 API.
DrupalConnect aims to truly let you use Drupal as a pure backend data store for your website.
At the moment, this is purely a work in progress. Please do not start using this in production, but for learning, testing or contributing only. When we're ready with v1, we'll freeze the core take off this message.
First, read up on the requirements.
The starting point of querying resources from Drupal is by configuring an instance of the \DrupalConnect\DocumentManager. This allows us to query for Documents (a document can be a node, comment, file, user).
Here's an example code to configure the DocumentManager:
<?php
// Configure the connection to your Drupal
$drupalConnection = new \DrupalConnect\Connection(array(
'endpoint' => 'http://mydrupal.com/api/public/' // replace with your Services endpoint
));
// Create a DocumentManager which gives us access to Repositories, Query Builders, etc
$dm = new \DrupalConnect\DocumentManager($drupalConnection, array(
'file_base_url' => array(
'public' => 'http://mydrupal.com/sites/default/files/', // base url to your drupal's public files
'private' => 'http://mydrupal.com/drupal/system/files/' // base url to your drupal's private files
)
));
- Develop a Document, Repository, Hydrator and QueryBuilder model (90% complete) (testing)
- Query Nodes (100% complete) (testing)
- Retrieve Custom Fields (85% complete) (testing)
- Query Views (Broken) (fixing)
- Query Media/Files (100% complete) (testing)
- Query Taxanomy / Terms (90% complete) (testing)
- Query Menus
- Query Drupal System Variables
- Web Form Support
- Authentication Support
- Query Users
- Query Comments