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 | |
App::uses('AppController', 'Controller'); | |
class TasksController extends AppController { | |
public $components = ['Session', 'Paginator', 'RequestHandler']; | |
public function index() { | |
$this->Task->recursive = 0; | |
$this->Paginator->settings = $this->paginate; |
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 | |
App::uses('AppModel', 'Model'); | |
/** | |
* Article Model | |
* | |
* @property Comment $Comment | |
*/ | |
class Article extends AppModel { | |
/** |
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 | |
/** | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* | |
* Licensed under The MIT License | |
* For full copyright and license information, please see the LICENSE.txt | |
* Redistributions of files must retain the above copyright notice. | |
* | |
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
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
Idea for future DebugKit. | |
The current debug kit does a bunch of things right, but has a few short comings that are hard to address in the current design: | |
* DebugKit is slow - generating the HTML for the toolbar in the originating request is not fast, and DebugKit bloats every request with mountains of HTML. | |
* DebugKit is easily disrupted by the host page CSS - Having DebugKit on the host page means it is difficult to deliver an excellent UI for debugkit as it frequently gets interference from the host page. | |
* The History Panel is fragile and relies on Cache being enabled. | |
I think many of these problems can be solved with a few key changes: |
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
/** | |
* Tests that patchEntity includes _joinData | |
* all associations | |
* | |
* @return void | |
*/ | |
public function testPatchEntityJoinData() { | |
$articles = TableRegistry::get('Articles'); | |
$articles->belongsToMany('Tags'); |
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\Console\Command; | |
use Cake\Console\Shell; | |
use Cake\Routing\Router; | |
class BookRouteShell extends Shell { | |
public function main() { | |
$this->scoped(); |
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
I ran the same test 5 times, and this is the median result for Reverse | |
routing. While the numbers may vary in small amounts, the wins in | |
parse() are very signifcant. | |
In the store test, I did not try named routes, as this set of routes | |
was intended to stress test the parsing/matching changes. | |
------------------------------------------------------ | |
Book Routes - 3.0 HEAD |
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
$ brew install php54 | |
==> Downloading http://www.php.net/get/php-5.4.27.tar.bz2/from/this/mirror | |
Already downloaded: /Library/Caches/Homebrew/php54-5.4.27 | |
Warning: Backing up all known pear.conf and .pearrc files | |
Warning: If you have a pre-existing pear install outside | |
of homebrew-php, or you are using a non-standard | |
pear.conf location, installation may fail. | |
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.27 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enab | |
==> make | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) |
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
$ brew install php55 | |
==> Downloading http://www.php.net/get/php-5.5.11.tar.bz2/from/this/mirror | |
Already downloaded: /Library/Caches/Homebrew/php55-5.5.11 | |
Warning: Backing up all known pear.conf and .pearrc files | |
Warning: If you have a pre-existing pear install outside | |
of homebrew-php, or you are using a non-standard | |
pear.conf location, installation may fail. | |
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.11 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-config-file-scan-dir=/usr/local/etc/php/5.5/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enab | |
checking for mmap() using shm_open() shared memory support... no | |
checking for mmap() using regular file shared memory support... no |