This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"server": { | |
"name": "Server 1", | |
"url": "http://server1.whatevs.com" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$config=Config::Get('db'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class HasAccessScreen extends Screen | |
{ | |
public function before($controller,$metadata,&$data) | |
{ | |
// make sure we have a valid user id from current session | |
if (!$uid=$controller->session->id) | |
throw new InvalidParametersException(); | |
// fetch the forum ID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class StatsScreen extends Screen | |
{ | |
private $start; | |
public function before($controller,$metadata,&$data) | |
{ | |
$this->start=microtime(true); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before: | |
has_profile: { ignore: true } | |
has_access: { ignore: true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before: | |
has_profile: {} | |
has_access: { to: 'forums.forum', key: 'forum_id' } | |
stats: {} | |
after: | |
stats: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* [[ | |
* before: | |
* has_profile: {} | |
* has_access: { to: 'forum' } | |
* stats: {} | |
* after: | |
* stats: {} | |
* ]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class PostController extends Controller | |
{ | |
public function setup() | |
{ | |
$this->ignored[]='dont_call_me'; | |
} | |
public function dont_call_me() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class PostController extends Controller | |
{ | |
public function index($post_id) | |
{ | |
if (is_numeric($post_id)) | |
{ | |
$post=Model::Instance('blog.post',$post_id); | |
if ($post) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class PostController extends Controller | |
{ | |
/** | |
* [[ | |
* view: 'post/edit' | |
* ]] | |
*/ | |
public function create() | |
{ |