2011-10-29 02:01:33 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* PHP 5
|
|
|
|
*
|
|
|
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
2013-02-08 11:59:49 +00:00
|
|
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2011-10-29 02:01:33 +00:00
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
2013-02-08 12:22:51 +00:00
|
|
|
* For full copyright and license information, please see the LICENSE.txt
|
2011-10-29 02:01:33 +00:00
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
2013-02-08 11:59:49 +00:00
|
|
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2011-10-29 02:01:33 +00:00
|
|
|
* @link http://cakephp.org CakePHP(tm) Project
|
|
|
|
* @package Cake.Test.test_app.View.Json
|
|
|
|
* @since CakePHP(tm) v 2.1.0
|
|
|
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
|
|
|
*/
|
|
|
|
|
2012-08-22 11:13:49 +00:00
|
|
|
$paging = isset($this->Paginator->options['url']) ? $this->Paginator->options['url'] : null;
|
|
|
|
|
2011-10-29 02:01:33 +00:00
|
|
|
$formatted = array(
|
|
|
|
'user' => $user['User']['username'],
|
2012-08-22 11:13:49 +00:00
|
|
|
'list' => array(),
|
|
|
|
'paging' => $paging,
|
2011-10-29 02:01:33 +00:00
|
|
|
);
|
|
|
|
foreach ($user['Item'] as $item) {
|
|
|
|
$formatted['list'][] = $item['name'];
|
|
|
|
}
|
|
|
|
|
2011-11-08 02:46:52 +00:00
|
|
|
echo json_encode($formatted);
|