Skip to content

managlea/ResourceHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ResourceHandler

Package to provide wrapper for handling resources (resource as in RESTful APIs etc)

Scrutinizer Code Quality Build Status Code Coverage
Code Climate Test Coverage
SensioLabsInsight
Codacy Badge
Build Status Circle CI
PHP-Eye

Basic usage

Read more about packages which are required by ResourceHandler

// Create new EntityManagerFactory (instanceof Managlea\Component\EntityManagerFactoryInterface)
$entityManagerFactory = new EntityManagerFactory();

// Create new ResourceMapper by passing $entityManagerFactory in as parameter
$resourceMapper = ResourceMapper::initialize($entityManagerFactory);


// Create new resourceHandler (by passing correct resourceMapper in as parameter)
$resourceHandler = ResourceHandler::initialize($resourceMapper);

// Get single foo object with id 1
$foo = $resourceHandler->getSingle('foo', 1);

// Get collection of foos (by default 20 items, without any filters)
$fooCollection = $resourceHandler->getCollection('foo');

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages