Skip to content

Commit a4d42e8

Browse files
committed
feature: update documentation
1 parent b10be60 commit a4d42e8

1 file changed

Lines changed: 3 additions & 23 deletions

File tree

README.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class YourClass
2323
{
2424
public function run()
2525
{
26-
$activator = new DatabaseActivator(['url' => 'mysql://user:secret@localhost/mydb']);
26+
$activator = new DatabaseActivator('pdo-mysql://user:secret@localhost/mydb');
2727
2828
$manager = new FeatureManager($activator);
2929
if ($manager->isActive('your_feature_name')) {
@@ -69,27 +69,7 @@ class YourClass
6969
{
7070
public function run()
7171
{
72-
$activator = new DatabaseActivator([
73-
'url' => 'mysql://user:secret@localhost/mydb'
74-
]);
75-
76-
// ...
77-
}
78-
}
79-
```
80-
81-
###### PDO instance
82-
83-
```
84-
// YourClass.php
85-
86-
class YourClass
87-
{
88-
public function run()
89-
{
90-
$activator = new DatabaseActivator([
91-
'pdo' => $this->myPdoInstance
92-
]);
72+
$activator = new DatabaseActivator('pdo-mysql://user:secret@localhost/mydb');
9373
9474
// ...
9575
}
@@ -127,7 +107,7 @@ class YourClass
127107
{
128108
public function run()
129109
{
130-
$activator = new DatabaseActivator(['url' => 'mysql://user:secret@localhost/mydb'], [
110+
$activator = new DatabaseActivator('pdo-mysql://user:secret@localhost/mydb', [
131111
'db_table' => 'my_feature_table',
132112
'db_column_feature' => 'foo_feature_name',
133113
'db_column_state' => 'foo_is_active'

0 commit comments

Comments
 (0)