@@ -4,50 +4,7 @@ This tutorial will cover installation and usage examples.
4
4
5
5
## Installation
6
6
7
- Initially, all what is needed is:
8
-
9
- - > = php5.3.2
10
- - Symfony ** EventDispatcher** component and if you do not have autoloader, I recommend
11
- ** ClassLoader** from the same symfony components
12
- - this repository
13
-
14
- Now somewhere in you third party vendor directory download mentioned dependencies:
15
- ** Note:** if you are in your project root and you have [ git] ( http://help.github.com/set-up-git-redirect )
16
- installed, ** vendor** directory is the location where these components will be installed.
17
-
18
- - run ** git clone git://github.com/knplabs/knp-components.git vendor/knp-components**
19
- - run ** git clone git://github.com/symfony/EventDispatcher.git vendor/Symfony/Component/EventDispatcher**
20
- - run ** git clone git://github.com/symfony/ClassLoader.git vendor/Symfony/Component/ClassLoader**
21
-
22
- To initially autoload these components, you will need to include
23
- ** vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php**
24
-
25
- ``` php
26
- <?php
27
- // file: autoloader.php
28
- // taking into account that this autoloader is in the same directory as vendor folder
29
- require_once __DIR__.'/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
30
-
31
- $loader = new Symfony\Component\ClassLoader\UniversalClassLoader;
32
- $loader->registerNamespaces(array(
33
- 'Symfony\\Component' => __DIR__.'/vendor',
34
- 'Knp\\Component' => __DIR__.'/vendor/knp-components/src'
35
- ));
36
- $loader->register();
37
- ```
38
-
39
- Next, usually ** index.php** file is the starting point. Lets create it in the same
40
- project root directory as ** autoloader.php**
41
-
42
- ``` php
43
- <?php
44
- // file: index.php
45
- include 'autoloader.php';
46
-
47
- // usage examples will continue here
48
- ```
49
-
50
- In general now you can start using the paginator..
7
+ composer require "knplabs/knp-components:~1.2"
51
8
52
9
## Basic usage
53
10
0 commit comments