Arbit - project tracking

PHPillow - PHP CouchDB connector

Browse source code

File: / src/ classes/ file_view/ user.php

Type
text/plain text/plain
Last Author
kore
Version
159
Line Rev. Author Source
1 111 kore <?php
2 kore /**
3 kore * phpillow CouchDB backend
4 kore *
5 kore * This file is part of phpillow.
6 kore *
7 kore * phpillow is free software; you can redistribute it and/or modify it under
8 kore * the terms of the GNU Lesser General Public License as published by the Free
9 kore * Software Foundation; version 3 of the License.
10 kore *
11 kore * phpillow is distributed in the hope that it will be useful, but WITHOUT ANY
12 kore * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 kore * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 kore * more details.
15 kore *
16 kore * You should have received a copy of the GNU Lesser General Public License
17 kore * along with phpillow; if not, write to the Free Software Foundation, Inc., 51
18 kore * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 kore *
20 kore * @package Core
21 113 kore * @version $Revision: 159 $
22 111 kore * @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL
23 kore */
24 kore
25 kore /**
26 kore * Wrapper for user views
27 kore *
28 kore * @package Core
29 113 kore * @version $Revision: 159 $
30 111 kore * @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL
31 kore */
32 kore class phpillowUserFileView extends phpillowFileView
33 kore {
34 kore /**
35 kore * Construct view
36 159 kore *
37 111 kore * Construct view
38 159 kore *
39 111 kore * @return void
40 kore */
41 kore public function __construct()
42 kore {
43 kore parent::__construct();
44 kore
45 kore $this->viewFunctions = array(
46 kore 'all' => array(
47 kore 'map' => dirname( __FILE__ ) . '/map/user_all.js',
48 kore ),
49 kore 'user' => array(
50 kore 'map' => dirname( __FILE__ ) . '/map/user_user.js',
51 kore 'reduce' => dirname( __FILE__ ) . '/reduce/sum.js',
52 kore ),
53 kore );
54 kore }
55 kore
56 kore /**
57 kore * Create a new instance of the document class
58 kore *
59 kore * Create a new instance of the statically called document class.
60 kore * Implementing this method should only be required when using PHP 5.2 and
61 kore * lower, otherwise the class can be determined using LSB.
62 kore *
63 kore * Do not pass a parameter to this method, this is only used to maintain
64 kore * the called class information for PHP 5.2 and lower.
65 kore *
66 kore * @param mixed $docType
67 159 kore * @return phpillowUserFileView
68 111 kore */
69 kore public static function createNew( $docType = null )
70 kore {
71 kore return parent::createNew( $docType === null ? __CLASS__ : $docType );
72 kore }
73 kore
74 kore /**
75 kore * Get name of view
76 159 kore *
77 111 kore * Get name of view
78 159 kore *
79 111 kore * @return string
80 kore */
81 kore protected function getViewName()
82 kore {
83 kore return 'users';
84 kore }
85 kore }
86 kore