Skip to content

oudommeas/cakephpapicallguide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

cakephpapicallguide

  1. Use create Behavior to call remote api by using HttpSocket
function getCategoriesFromAPI(){

	// for example
	$results = $HttpSocket->get('http://www.google.com/search', 'q=cakephp');
	return $result;
}

Reference for HttpSocket

  1. Use that Behavior in model

var $actsAs = array('MyRemoteAPI');

Reference for Behaviors

  1. Stop using existing model functions/methods, use the ones in Behavior instead

$data = $this->Category->getCategoriesFromAPI();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published