drupal/drupal-driver
最新稳定版本:v2.3.0
Composer 安装命令:
composer require drupal/drupal-driver
包简介
A collection of reusable Drupal drivers
README 文档
README
Provides a collection of light-weight drivers with a common interface for interacting with Drupal. These are generally intended for testing, and are not meant to be API-complete.
Drivers
These drivers support Drupal versions 7 and 8.
- Blackbox
- Direct Drupal API bootstrap
- Drush
Installation
{
"require": {
"drupal/drupal-driver": "~2.0"
}
}
$> curl -sS http://getcomposer.org/installer | php $> php composer.phar install
Usage
<?php use Drupal\Driver\DrupalDriver; require 'vendor/autoload.php'; // Path to Drupal. $path = './drupal-8'; // Host. $uri = 'http://d8.devl'; $driver = new DrupalDriver($path, $uri); $driver->setCoreFromVersion(); // Bootstrap Drupal. $driver->bootstrap(); // Create a node. $node = (object) array( 'type' => 'article', 'uid' => 1, 'title' => $driver->getRandom()->name(), ); $driver->createNode($node);
Contributing
Features and bug fixes are welcome! First-time contributors can jump in with the issues tagged good first issue.
See CONTRIBUTING.md for more information.
Release notes
See CHANGELOG.
统计信息
- 总下载量: 15.31M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 71
- 点击次数: 1
- 依赖项目数: 27
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-01-04