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
.disabled { | |
/* Theoretically for IE 8 & 9 (more valid) */ | |
/* ...but not required as filter works too */ | |
/* should come BEFORE filter */ | |
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; | |
/* This works in IE 8 & 9 too */ | |
/* ... but also 5, 6, 7 */ | |
filter: alpha(opacity=80); |
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
<script> | |
window.onload = function() { | |
if (typeof window.load_once !== 'undefined' && window.load_once) { | |
window.location.reload(); | |
} | |
window.load_once = true; | |
} | |
</script> |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="https://github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script> | |
</head> | |
<body> | |
<script id="partial" type="text/x-handlebars-template"> | |
{{this}} | |
</script> |
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
/** | |
* Invokes a protected or private method | |
* | |
* @param object $object the object containing the method | |
* @param string $method_name the string name of the method contained on the object | |
* @param array $args an array of args to pass to the method (order matters) | |
* | |
* @return Closure the result of executed method | |
*/ | |
public function invokePrivateMethod($object, $method_name, array $args = 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
error example: | |
{"success":false,"errors":["No api key was passed"]} | |
GET /students/users | |
=================== | |
get all teachers or parents for a student | |
params | |
------ |
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
foreach ($objList as &$obj) { | |
$obj->key = 'whatever'; | |
} | |
//prevent leaks | |
unset($obj); |
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
# --enable-fpm #EXPERIMENTAL: Enable building of the fpm SAPI executable | |
# --enable-gd-native-ttf GD: Enable TrueType string function | |
# --enable-mbstring Enable multibyte string support | |
# --enable-sockets Enable sockets support | |
# --with-bz2[=DIR] Include BZip2 support | |
# --with-curl[=DIR] Include cURL support | |
# --with-gd[=DIR] Include GD support. DIR is the GD library base | |
# --with-mcrypt[=DIR] Include mcrypt support | |
# --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base | |
# directory. If mysqlnd is passed as DIR, |
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
Lithium PHP Framework Talk Outline | |
About Lithium | |
------------- | |
Lithium PHP is modern PHP 5.3+ MVC framework aimed at developers looking for a framework that offers amazing flexibility built | |
on top of a solid set of built-in conventions and defaults. Lithium takes liberal advantage of PHP 5.3 features like | |
closures (anonymous functions), namespaces (for autoloading classes) and late-static-binding (proper subclassing for static methods). | |
Lithium was developed by some of the core developers of CakePHP and brings a strong pedigree from experienced high-adoption framework designers. | |
Talk Summary |
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
Users::applyFilter('save', function($self, $params, $chain) { | |
$record = $params['entity']; | |
if ($record->validates() && !$record->id) { | |
$record->password = Password::hash($record->password); | |
} | |
$params['entity'] = $record; | |
return $chain->next($self, $params, $chain); |
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
/* app/extensions/MyHelper.php */ | |
<?php | |
namespace lithium\template\helper; | |
class MyHelper { | |
public function foo() { | |
return 'bar'; | |
} |
NewerOlder