This file contains 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 | |
/* config/bootstrap/session.php */ | |
use lithium\storage\Session; | |
$name = basename(LITHIUM_APP_PATH); | |
Session::config(array( | |
// 'cookie' => array('adapter' => 'Cookie', 'name' => $name), | |
'default' => array('adapter' => 'Php', 'session.name' => $name) | |
)); |
This file contains 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 $this->title('Listing Departments'); ?> | |
<h2>Listing Departments</h2> | |
<?php if (empty($departments)): ?> | |
<p>Sorry, there are no Departments to display.</p> | |
<?php else: ?> | |
<table> | |
<tr> | |
<th style="width: 75%;">Title</th> | |
<th colspan="3">Actions</th> | |
</tr> |
This file contains 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
Base model | |
<?php | |
namespace app\extensions\data; | |
class Model extends \lithium\data\Model { | |
public static function __init() { | |
$self = static::_object(); | |
static::config(); |
This file contains 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
//controllers/AdminsController.php | |
<?php | |
class AdminsController extends \lithium\action\Controller { | |
public function search() { | |
if (form submitted) { | |
//prepare the url and redirect to same method | |
//so that we have a _GET based search URL | |
} else { |
This file contains 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 | |
//extensions/data/Model.php | |
public static function __init() { | |
static::_isBase(__CLASS__, true); | |
parent::__init(); | |
//static::all(); //doesn't work | |
#$self = static::_object(); |
This file contains 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
Model: | |
<?php | |
class ZipCodes extends \app\extensions\data\Model { | |
protected $_meta = array( | |
'key' => 'zip_code_id', | |
'title' => 'state_name' | |
); | |
protected $_schema = array( |
This file contains 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
[{"name":"Bears","color":"Blue","position":{"x":177,"y":85},"modelclass":"Bear","increment":false,"timestamp":false,"softdelete":false,"column":[{"colid":"c217","name":"id","type":"increments","length":"0","order":0,"defaultvalue":"","enumvalue":""},{"colid":"c218","name":"name","type":"string","length":"200","order":1,"defaultvalue":"","enumvalue":""},{"colid":"c219","name":"danger_level","type":"string","length":"200","order":2,"defaultvalue":"","enumvalue":""}],"relation":[{"extramethods":"","foreignkeys":"","name":"fish","relatedmodel":"Fish","relationtype":"hasOne","usenamespace":""},{"extramethods":"","foreignkeys":"","name":"trees","relatedmodel":"Trees","relationtype":"hasMany","usenamespace":""},{"extramethods":"","foreignkeys":"bear_id, picnic_id","name":"picnics","relatedmodel":"Picnics","relationtype":"belongsToMany","usenamespace":""}],"seeding":[]},{"name":"Fish","color":"Yellow","position":{"x":1063,"y":14},"modelclass":"Fish","increment":false,"timestamp":false,"softdelete":false,"column":[{"c |
This file contains 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
# sudo apt-get install make build-essential ccache g++ libgif-dev libjpeg62-dev libfreetype6-dev libpng12-dev libgif-dev | |
# cd /tmp/alfrescoinstall | |
# curl -# -O http://www.swftools.org/swftools-2013-04-09-1007.tar.gz | |
# tar xf swftools*.tar.gz | |
# cd "$(find . -type d -name "swftools*")" | |
# ./configure | |
# sudo make && sudo make install | |
Installing build tools and libraries needed to compile swftools. Fetching packages... | |
debconf: unable to initialize frontend: Dialog |
This file contains 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
version: '2' | |
services: | |
mariadb: | |
env_file: | |
- ./mariadb/dev/passwords.env | |
# cat ./mariadb/dev/passwords.env | |
MYSQL_ROOT_PASSWORD=root | |
MYSQL_DATABASE=database_name_here |
This file contains 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
AWSTemplateFormatVersion: '2010-09-09' | |
Resources: | |
MyLambdaFunction: | |
Type: AWS::Lambda::Function | |
. | |
. | |
. |
OlderNewer