Skip to content

Instantly share code, notes, and snippets.

@cogentParadigm
Last active September 26, 2015 07:37
Show Gist options
  • Save cogentParadigm/1062035 to your computer and use it in GitHub Desktop.
Save cogentParadigm/1062035 to your computer and use it in GitHub Desktop.
Starbug Examples
<?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/";
}
?>
<?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