PHPackages                             angelxmoreno/cakephp-tmdb-datasource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. angelxmoreno/cakephp-tmdb-datasource

ActiveCakephp-plugin[API Development](/categories/api)

angelxmoreno/cakephp-tmdb-datasource
====================================

A CakePHP plugin for connecting to the TMDB API using a Datasource

1.0.2(11y ago)320MITPHP

Since Dec 22Pushed 11y ago2 watchersCompare

[ Source](https://github.com/angelxmoreno/CakePHP-TMDB-Datasource)[ Packagist](https://packagist.org/packages/angelxmoreno/cakephp-tmdb-datasource)[ Docs](https://github.com/angelxmoreno/CakePHP-TMDB-Datasource)[ RSS](/packages/angelxmoreno-cakephp-tmdb-datasource/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

TMDB (tmdb.org) Datasource for CakePHP
======================================

[](#tmdb-tmdborg-datasource-for-cakephp)

A CakePHP plugin for accessing the TMDB API via a Datasource.

Plugin purpose
--------------

[](#plugin-purpose)

The purpose of this plugin is to provide easy access to the TMDB API for any CakePHP application. Currently the plugin only holds the TMDB datasource but will evolve to include Models, Controllers, Views and Helpers. With the plugin you will be able to create an application with access to an extensive list of movies, actors and all the data provided my the TMDB API.

Requirements
------------

[](#requirements)

- CakePHP version 2.0
- A TMDB API key - To register for an API key, head into your [account page](https://www.themoviedb.org/account/) on The Movie Database (tmdb.org)and generate a new key from within the "API Details" section.

Installation &amp; Setup##
--------------------------

[](#installation--setup)

### Getting the code

[](#getting-the-code)

Via Submodule

```
$ cd /your_app_path
$ git submodule add git@github.com:angelxmoreno/CakePHP-TMDB-Datasource.git Plugin/TmdbApi

```

Via Clone

```
$ cd /your_app_path/Plugin
$ git git@github.com:angelxmoreno/CakePHP-TMDB-Datasource.git TmdbApi

```

Via I-don't-use-git-but-I-really-should

```
* Unzip this plugin into your app/Plugin/ directory
* Rename the folder to `TmdbApi`

```

\###Enable plugin You need to enable the plugin your your\_app\_path/Config/bootstrap.php file:

```
CakePlugin::load('TmdbApi');

```

If you are already using `CakePlugin::loadAll();`, then this is not necessary.

### Database settings

[](#database-settings)

In your your\_app\_path/Config/database.php add a new entry for the datasource

```
public $tmdb = array(
	'datasource' => 'TmdbApi.TmdbSource',
	'apiKey' => 'YOUR-API-KEY',
);
```

### Model setup

[](#model-setup)

Create a model and make sure you add the `$useDbConfig` and `$useTable` appropriately. The value of `$useDbConfig` should be the databse.php property that holds your datasource information. The value of `$useTable` pertains to the TMDB entity you will be accessing via the model. Below is an example:

```
class TmdbMovie extends AppModel {
	public $useDbConfig = 'tmdb';
	public $useTable = 'movies';
}
```

Usage
-----

[](#usage)

```
$results = $this->TmdbMovie->read(null, 550);
debug($results);

$results = $this->TmdbMovie->find('first', array('conditions'=>array(
	'query'=>'Terminator',
	'append_to_response' => array('images'),
)));
debug($results);

$results = $this->TmdbMovie->find('all', array('conditions'=>array(
	'query'=>'Batman',
	'append_to_response' => true,//will auto append all applicable calls
)));
debug($results);
```

Support
-------

[](#support)

For support, bugs and feature requests, please use the [issues section](https://github.com/angelxmoreno/CakePHP-TMDB-Datasource/issues) of this repository - .

Branch strategy
---------------

[](#branch-strategy)

[![Build Status](https://camo.githubusercontent.com/0b4280052f5ea9a9ebbc8957378e5ba65d9fe245e88a5e4fd3b54f986dd0ba47/68747470733a2f2f7472617669732d63692e6f72672f616e67656c786d6f72656e6f2f43616b655048502d544d44422d44617461736f757263652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/angelxmoreno/CakePHP-TMDB-Datasource) The master branch holds the STABLE latest version of the plugin.

[![Build Status](https://camo.githubusercontent.com/7ed07c32f9c29d9e2788d584ddc0e891aec66150dcef308db9084ce887148924/68747470733a2f2f7472617669732d63692e6f72672f616e67656c786d6f72656e6f2f43616b655048502d544d44422d44617461736f757263652e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/angelxmoreno/CakePHP-TMDB-Datasource) Develop branch is UNSTABLE and used to test new features before releasing them.

Contributing to this Plugin
---------------------------

[](#contributing-to-this-plugin)

Please feel free to contribute to the plugin with new issues, requests, unit tests, code fixes or new features. If you choose to contribute, create a feature branch from develop, and send me your pull request. Unit tests for new features and issues detected are highly encourged.

License
-------

[](#license)

Copyright 2013 Angel S. Moreno (angelxmoreno). All rights reserved. Licensed under [The MIT License](http://opensource.org/licenses/mit-license.php). Redistributions of files must retain the above copyright notice.

Acknowledgments
---------------

[](#acknowledgments)

Thanks to:

[Larry Masters](https://github.com/phpnut) and [everyone](https://github.com/cakephp/cakephp/contributors) who has contributed to [CakePHP](http://cakephp.org).

[Travis Bell](http://blog.travisbell.com/about/), founder and lead developer of The Movie Database ([TMDb](http://www.themoviedb.org/)).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4166d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58aebae1bf475954887c4c975a24950aa32c0dd34026400fa0303f7a43672389?d=identicon)[angelxmoreno](/maintainers/angelxmoreno)

---

Top Contributors

[![angelxmoreno](https://avatars.githubusercontent.com/u/363479?v=4)](https://github.com/angelxmoreno "angelxmoreno (13 commits)")

---

Tags

apicakephpdatasourcemovie

### Embed Badge

![Health badge](/badges/angelxmoreno-cakephp-tmdb-datasource/health.svg)

```
[![Health](https://phpackages.com/badges/angelxmoreno-cakephp-tmdb-datasource/health.svg)](https://phpackages.com/packages/angelxmoreno-cakephp-tmdb-datasource)
```

###  Alternatives

[php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

16553.3k1](/packages/php-tmdb-laravel)[wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

4252.9k](/packages/wtfzdotnet-php-tmdb-api)[bcrowe/cakephp-api-pagination

CakePHP 4 plugin that injects pagination information into API responses.

3953.5k1](/packages/bcrowe-cakephp-api-pagination)[php-tmdb/symfony

Symfony Bundle for TMDB (The Movie Database) API. Provides easy access to the php-tmdb/api library.

3649.7k](/packages/php-tmdb-symfony)[hmerritt/imdb-api

IMDB API that can fetch film data and search results

6911.3k](/packages/hmerritt-imdb-api)[a2design-company/mandrill-cakephp-plugin

Mandrill CakePHP plugin

193.2k](/packages/a2design-company-mandrill-cakephp-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
