| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
require_once 'DB/DataObject.php'; |
|---|
| 4 |
|
|---|
| 5 |
class Example extends SGL_Manager |
|---|
| 6 |
{ |
|---|
| 7 |
var $methodTable; |
|---|
| 8 |
|
|---|
| 9 |
function Example() |
|---|
| 10 |
{ |
|---|
| 11 |
SGL::logMessage(null, PEAR_LOG_DEBUG); |
|---|
| 12 |
parent::SGL_Manager(); |
|---|
| 13 |
|
|---|
| 14 |
$this->methodTable = array( |
|---|
| 15 |
"isMember" => array( |
|---|
| 16 |
"description" => "Return true if user is logged", |
|---|
| 17 |
"access" => "remote", |
|---|
| 18 |
"arguments" => array (), |
|---|
| 19 |
) |
|---|
| 20 |
); |
|---|
| 21 |
|
|---|
| 22 |
} |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
function isMember( ) |
|---|
| 26 |
{ |
|---|
| 27 |
SGL::logMessage(null, PEAR_LOG_DEBUG); |
|---|
| 28 |
if ( SGL_Session::getRoleId() == SGL_MEMBER) { |
|---|
| 29 |
return true; |
|---|
| 30 |
} else { |
|---|
| 31 |
return false; |
|---|
| 32 |
} |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|
| 35 |
} |
|---|
| 36 |
?> |
|---|