Bin will be removed on June 1, 2014 in favor of http://gist.github.com. Please save all your pastes before then. So long, and thanks for all the fish!×

set

View Paste
  1. <?php
  2. App::import('Core', 'Set');
  3.  
  4. class SetTest extends CakeTestCase {
  5.     function testExtract...
This test fails in 1.3RC2, IIUC from http://book.cakephp.org/view/1501/extract, this should work
View Paste
  1. // Below the array
  2. // using Set::extract with xpath
  3. $xpathData = Set::extract($res, '/Response/...
What do I do wrong with that xpath?
View Paste
  1. I have the following array, named $usergrouppermissions:
  2.  
  3. (
  4.     [0] => Array
  5.         (...
Problem with how to check an array against part of another using Set::contains()
View Paste
  1. <?php
  2.  
  3. $totals = array(
  4.       array(
  5.             'Log' => array(
  6.                   'hits'=>7...
How would I use a Set::combine or a Set::extract to take this array and merge all of the data int...
View Paste
  1. {
  2.  
  3. page: 1,
  4.  
  5. total: 239,
  6.  
  7. rows: [
  8.  
  9. {id:'ZW',cell:['ZW','ZIMBABWE','Zimbabwe','ZWE','716']...
JSON Object for Flexigrid
View Paste
  1. app/views/layouts/grid.ctp (line 7)
  2.  
  3. (
  4.     [0] => Array
  5.         (
  6.             [Conten...
How can i use cakes SET class to turn this array into same array with the key 'Content' exchanged...