Last active
September 26, 2015 07:37
-
-
Save cogentParadigm/1062035 to your computer and use it in GitHub Desktop.
Starbug Examples
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
<?php | |
class Host { | |
/* the type of environment this is: development or production */ | |
const ENVIRONMENT = "development"; | |
/* details for database */ | |
const DB_TYPE = "mysql"; | |
const DB_HOST = "localhost"; | |
const DB_USERNAME = "dbuser"; | |
const DB_PASSWORD = "dbpass"; | |
const DB_NAME = "test"; | |
const PREFIX = "sb_"; | |
/* URL of website */ | |
const WEBSITE_URL = "starbugphp.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
<?php | |
/********************************************************* | |
* we can add a uri by calling the uri function: | |
* $this->uri("[path]", "[property1]:[value1] [property2]:[value2]"); | |
* | |
* setting the path to "my-new-page" will mean that the page | |
* can be accessed at the url /my-new-page | |
********************************************************/ | |
$this->uri("my-new-page"); | |
/********************************************************* | |
* By default, the page will be accessible to everyone, | |
* we can restrict to users in the admin group by adding a groups parameter. | |
********************************************************/ | |
$this->uri("secret-sauce", "groups:admin"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment