Syntax highlighting for github

This commit is contained in:
UndefinedOffset 2012-10-10 10:40:53 -03:00
parent 87151aad83
commit 9b5e892ee4
2 changed files with 62 additions and 60 deletions

View File

@ -1,8 +1,8 @@
has_many Example
=================
:::php
/*** TestPage.php ***/
class TestPage extends Page {
```php
/*** TestPage.php ***/
class TestPage extends Page {
public static $has_many=array(
'TestObjects'=>'TestObject'
);
@ -17,15 +17,16 @@ has_many Example
return $fields;
}
}
}
/*** TestObject.php ***/
class TestObject extends DataObject {
/*** TestObject.php ***/
class TestObject extends DataObject {
public static $db=array(
'Title'=>'Text',
'SortOrder'=>'Int'
);
public static $default_sort='SortOrder';
}
}
```

View File

@ -1,8 +1,8 @@
many_many Example
=================
:::php
/*** TestPage.php ***/
class TestPage extends Page {
```php
/*** TestPage.php ***/
class TestPage extends Page {
public static $many_many=array(
'TestObjects'=>'TestObject'
);
@ -28,11 +28,11 @@ many_many Example
public function TestObjects() {
return $this->getManyManyComponents('TestObjects')->sort('SortOrder');
}
}
}
/*** TestObject.php ***/
class TestObject extends DataObject {
/*** TestObject.php ***/
class TestObject extends DataObject {
public static $db=array(
'Title'=>'Text'
);
@ -40,4 +40,5 @@ many_many Example
public static $belongs_many_many=array(
'TestPages'=>'TestPage'
);
}
}
```