- Submit a ticket and mention that you are working on it.
- Send pull requests to the
master
branch. - In the pull request or the commit message, tell us which issue this is for.
- Topic branches are encouraged but not enforced.
- Changes must have unit tests and updated documentation.
- Validate all existing tests and new tests are successful.
- Validate your new code meets lithium coding standards.
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 | |
/** | |
* CommandLine class | |
* | |
* @package Framework | |
*/ | |
/** | |
* Command Line Interface (CLI) utility class. | |
* | |
* @author Patrick Fisher <[email protected]> |
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
# | |
# A virtual host using mix of IP-, name-, and port-based configuration. | |
# This is based on using Homebrew for OS X. You can use this in other | |
# cases though, but you'll likely need to adjust some of the paths below. | |
# | |
server { | |
# Replace this port with the right one for your requirements | |
# listen 80 [default|default_server]; #could also be 1.2.3.4:80 |
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 | |
namespace app\models; | |
class Url extends \lithium\data\Model { | |
protected $_schema = array( | |
'_id' => array ('type' => 'id'), | |
'url' => array('type' => 'string'), | |
'slug' => array('type' => 'string') | |
); |
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 | |
namespace app\extensions\helper; | |
class Form extends \lithium\template\helper\Form { | |
/** | |
* String templates used by this helper. | |
* | |
* @var array |
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 | |
namespace my_app\models; | |
use MongoId; | |
use lithium\data\collection\DocumentArray; | |
use lithium\data\collection\DocumentSet; | |
use lithium\data\entity\Document; | |
use lithium\util\Inflector; | |
use lithium\core\Libraries; |
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 | |
use lithium\action\Response; | |
use lithium\core\Environment; | |
use lithium\core\ErrorHandler; | |
use lithium\core\Libraries; | |
use lithium\console\Response as ConsoleResponse; | |
use lithium\net\http\Media; | |
use lithium\analysis\Logger; | |
use lithium\net\http\Service; |
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 | |
/** | |
* This script is meant to be executed via crontab. | |
* It should help you easily set li3 commands as cron jobs. | |
* | |
* You should put this in the root of your application. | |
* However, you don't need to, but you would then need to | |
* pass a --path= option with the path to your app. | |
* This is because the li3 console command must be called | |
* from a specific location. |
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 | |
# From my question and answer at SO: | |
# http://stackoverflow.com/questions/10183103/security-of-generating-hash-salts-using-phps-mt-rand | |
function blowfish($string, $salt = NULL, $iterations = '12') | |
{ | |
return crypt($string, $salt ?: "$2a\$$iterations$" . md5(mcrypt_create_iv(22, MCRYPT_DEV_URANDOM))); | |
} |
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 | |
xdebug_start_trace('/tmp/mytrace'); | |
// do stuff | |
xdebug_stop_trace(); | |
?> |