Commit b085cc11 authored by Bas de Nooijer's avatar Bas de Nooijer Committed by GitHub

Merge pull request #437 from floriansemm/doc-fixes

fix sample-code in Plugin System section
parents f71a6a67 ebc731b8
......@@ -97,7 +97,8 @@ By combining these options you can achieve almost any type of customization with
Solarium uses a separate library (included using Composer) for events. For more info on the Event Dispatcher take a look at [http://symfony.com/doc/2.0/components/event\_dispatcher/introduction.html the docs](http://symfony.com/doc/2.0/components/event_dispatcher/introduction.html_the_docs)
This example shows all available events and how to use the events to create a very basic debugger: ```php
This example shows all available events and how to use the events to create a very basic debugger:
```php
<?php
require(__DIR__.'/init.php');
use Solarium\Core\Event\Events;
......@@ -230,7 +231,8 @@ htmlFooter();
```
The second example shows how to replace the built-in select querytype with a custom implementation: ```php
The second example shows how to replace the built-in select querytype with a custom implementation:
```php
<?php
require(__DIR__.'/init.php');
use Solarium\Client;
......@@ -297,4 +299,4 @@ Extending Solarium classes
You can extend any class in Solarium, there is no use of 'private' or 'final'. However, Solarium does have several built-in class mappings for factory methods. Most important are the querytype mapping in Solarium\\Client and the component mapping in Solarium\\QueryType\\Select\\Query\\Query. In some cases you might need to alter this mappings for your classes to be used.
Other than that, there are no special issues to be expected. You can extend Solarium classes like any other PHP class.
If your use case can be solved using plugins that is probably the safest choice, as by extending classes you gain access to non-public methods in the API. These are subject to change in future releases, where the public API is not (except for major releases).
\ No newline at end of file
If your use case can be solved using plugins that is probably the safest choice, as by extending classes you gain access to non-public methods in the API. These are subject to change in future releases, where the public API is not (except for major releases).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment