blob: a816bbfb768e6e529709c52324b24744b4160f8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
```php
$descriptionFactory = new DescriptionFactory();
// Equivalent to [[Category:Foo]]
$classDescription = $descriptionFactory->newClassDescription(
new DIWikiPage( 'Foo', NS_CATEGORY )
);
```
```php
// Equivalent to [[:+]]
$namespaceDescription = $descriptionFactory->newNamespaceDescription(
NS_MAIN
);
```
```php
// Equivalent to [[Foo::+]]
$anyValueForSomeProperty = $descriptionFactory->newSomeProperty(
new DIProperty( 'Foo' ),
new ThingDescription()
);
```
```php
// Equivalent to [[:+]][[Category:Foo]][[Foo::+]]
$description = $descriptionFactory->newConjunction( array(
$namespaceDescription,
$classDescription,
$anyValueForSomeProperty
) );
```
```php
// Equivalent to [[Category:Foo]] OR [[Foo::+]]
$description = $descriptionFactory->newDisjunction( array(
$classDescription,
$anyValueForSomeProperty
) );
```
|