• This repository has been archived on 07/Nov/2020
  • Stars
    star
    113
  • Rank 300,365 (Top 7 %)
  • Language
    PHP
  • Created over 14 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[Unmaintained] Official CakePHP API Generator Git Repository

Api Generator

⚠️ This project is now unmaintained. I recommend using ApiGen or PHPDocumentor instead. If you would like to become its maintainer open an issue.

The Api Generator provides an easy to use always current documentation generation tool. Api documentation is generated using PHP's reflection API. A few simple database tables are used to maintain an index of classes, packages and files and provide the ability to search through a project. Api Generator supports PHPdoc format docblocks and allows you to use Markdown formatting in your documentation blocks.

Requirements:

  • PHP5 - Requires PHP5.2. If you are on PHP4 too bad, time to upgrade anyways.
  • CakePHP 1.x
    • The 0.3 tag and 0.3-branch are compatible with CakePHP 1.2
    • The v0.4 tag and the 1.3 branch are compatible with CakePHP 1.3
    • The master branch is compatible with CakePHP 2.0

Installation

The original installation guide is available here: http://cakephp.lighthouseapp.com/projects/42879/docs-installation

The basic steps for Cake 2.x are:

  • Ensure you have a working Cake console (refer to the Console section of the book)
  • Unzip or clone the files from this repository into /app/Plugin/ApiGenerator/
  • Activate the plugin in /app/Config/bootstrap.php with either of these lines:
    CakePlugin::load('ApiGenerator');
    or simply
    CakePlugin::loadAll();
  • Type the following commands from the console to initialise the database, setup config options, and create an initial index:
    • cake ApiGenerator.ApiIndex initdb
    • cake ApiGenerator.ApiIndex showfiles
    • cake ApiGenerator.ApiIndex update
  • The update will display any errors or warnings it encounters
  • Visit http://mycakeurl/api_generator/api_classes to display a list of classes found in the index

Configuration

The showfiles console command will prompt the user to provide configuration options (with some sensible defaults), but these will often need to be tweaked. Configuration is stored inside /app/Plugin/ApiGenerator/Config/api_config.ini

An example configuration file:

[paths]
D:\MyCakeApp\app\ = true
D:\MyCakeApp\AnotherLibrary\ = true
[exclude]
properties = n
directories = Vendor,webroot,ApiGenerator,Test,tmp
files = empty
[file]
extensions = php,ctp
regex = [A-Za-z_\\-0-9]+
[users]
admin = passwordHere
  • properties - can be set to public, private, or protected (or any combination of these, separated by commas) and will exclude these functions from the index
  • directories - names of directories to exclude
  • files - names of files to exclude
  • extensions - the file extensions that should be searched
  • regex - filenames that match the regex should be searched

Example DocBlock

(Taken from Cake's own Controller class)

/**
 * An array containing the class names of models this controller uses.
 *
 * Example: `public $uses = array('Product', 'Post', 'Comment');`
 *
 * Can be set to several values to express different options:
 *
 * - `true` Use the default inflected model name.
 * - `array()` Use only models defined in the parent class.
 * - `false` Use no models at all, do not merge with parent class either.
 * - `array('Post', 'Comment')` Use only the Post and Comment models. Models
 *   Will also be merged with the parent class.
 *
 * The default value is `true`.
 *
 * @var mixed A single name as a string or a list of names as an array.
 * @link http://book.cakephp.org/2.0/en/controllers.html#components-helpers-and-uses
 */
public $uses = true;

The backtick can be used to indicate code samples, and various tags such as @var, @param, @return can provide helpful reference information.

Reporting issues

If you have an issues with Api Generator please open a ticket on lighthouse:
http://cakephp.lighthouseapp.com/projects/42879-api-generator/overview

Contributing

If you'd like to contribute to ApiGenerator, you can do so by forking the repository and sending pull requests. You can also open tickets for features at the lighthouse

More Repositories

1

cakephp

CakePHP: The Rapid Development Framework for PHP - Official Repository
PHP
8,679
star
2

phinx

PHP Database Migrations for Everyone
PHP
4,441
star
3

chronos

A standalone DateTime library originally based off of Carbon
PHP
1,333
star
4

debug_kit

Debug Toolbar for CakePHP applications.
PHP
854
star
5

docs

CakePHP CookBook
Makefile
671
star
6

app

CakePHP application template
PHP
361
star
7

datasources

CakePHP Datasources
PHP
238
star
8

cakephp-codesniffer

CakePHP Code Sniffer
PHP
237
star
9

localized

I18n and L10n related CakePHP code
PHP
213
star
10

orm

[READ-ONLY] A flexible, lightweight and powerful Object-Relational Mapper for PHP, implemented using the DataMapper pattern. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
148
star
11

migrations

CakePHP database migrations plugin
PHP
132
star
12

utility

[READ-ONLY] CakePHP Utility classes such as Inflector, Text, Hash, Security and Xml. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
118
star
13

acl

Plugin for managing ACL in CakePHP applications.
PHP
112
star
14

authentication

Authentication plugin for CakePHP. Can also be used in PSR7 based applications.
PHP
112
star
15

upgrade

Upgrade tools for CakePHP meant to facilitate migrating from one version of the framework to another
PHP
108
star
16

bake

The Bake Command Plugin
PHP
106
star
17

database

[READ-ONLY] Flexible and powerful Database abstraction library with a familiar PDO-like API. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
89
star
18

elastic-search

Elastic search datasource for CakePHP
PHP
87
star
19

collection

[READ-ONLY] Collection library in CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
87
star
20

legacy-twig-view

Twig for CakePHP
PHP
81
star
21

authorization

PSR7 Middleware for authorization
PHP
72
star
22

old-cookbook

[Unmaintained] CakePHP Cookbook/Online Manual Repository
JavaScript
59
star
23

cakephp-netbeans

CakePHP support in NetBeans
Java
58
star
24

core

[READ-ONLY] CakePHP Framework Core Classes. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
58
star
25

cache

[READ-ONLY] Easy to use Caching library with support for multiple caching backends. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
51
star
26

plugins.cakephp.org

Self-contained application that automatically tracks cakephp developer's open source code repositories, including applications and plugins
PHP
50
star
27

cakephp-tmbundle

Official CakePHP TextMate Bundle Git Repository
46
star
28

codeception

CakePHP module for Codeception
PHP
46
star
29

datasource

[READ-ONLY] Provides connection managing and traits for Entities and Queries that can be reused for different datastores. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
45
star
30

validation

[READ-ONLY] Validation library from CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
43
star
31

queue

A queue-interop compatible Queueing library
PHP
36
star
32

plugin-installer

A composer installer for installing CakePHP plugins.
PHP
32
star
33

i18n

[READ-ONLY] Provides support for message translation and localization for dates and numbers. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
29
star
34

cakephp-api-docs

CakePHP API Docs
PHP
28
star
35

log

[READ-ONLY] Logging library with support for multiple different streams. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
26
star
36

cms-tutorial

The completed CMS tutorial for CakePHP
PHP
25
star
37

old-bakery

No longer used code for bakery.cakephp.org
PHP
24
star
38

bookmarker-tutorial

The finished result of the bookmarker tutorial. Also serves as a sample application using CakePHP 3.x
PHP
24
star
39

event

[READ-ONLY] The event dispatcher library for CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
PHP
22
star
40

filesystem

[READ ONLY] Convenience library to help you work with files and folders.
PHP
20
star
41

irc.cakephp.org

Official CakePHP IRC Bot Repository
PHP
14
star
42

twig-view

Twig View for CakePHP
PHP
13
star
43

sphinxtheme

Sphinx theme and common configuration for CakePHP documentation projects.
CSS
12
star
44

cakephp.org

Main CakePHP Site
PHP
11
star
45

search.cakephp.org

An Elastic search wrapper for the CakePHP documentation search.
PHP
9
star
46

inflector.cakephp.org

CakePHP Inflector Website
PHP
9
star
47

form

[READ-ONLY] - Form abstraction used to create forms not tied to ORM backed models, or to other permanent datastores.
PHP
9
star
48

CakeFest-2010-Workshop

CakeFest 2010 Workshop
PHP
7
star
49

cakephp.github.com

7
star
50

console

[Read only] Console libraries from CakePHP
PHP
6
star
51

bin.cakephp.org

CakePHP paste bin
PHP
6
star
52

http

[READONLY] HTTP client and server libraries
PHP
6
star
53

bakery.cakephp.org

The Official CakePHP blog
CSS
5
star
54

docs-builder

A set of common tools to build documentation sites for plugins
PHP
5
star
55

repl

Console tools for a REPL interface for CakePHP applications
PHP
5
star
56

CakeFest-2012-Workshop

CakeFest 2012 Workshop
PHP
5
star
57

cakefest2020

Code and examples for CakeFest 2020 workshops
PHP
4
star
58

tutorials.cakephp.org

PHP
3
star
59

.github

3
star
60

csfnavbar

[Unmaintained] Top bar navigation for CakePHP domains
CSS
3
star
61

cdn.cakephp.org

2
star
62

community.cakephp.org

PHP
2
star
63

discord-slack-bridge

An internal discord <=> slack chat bridge
Dockerfile
2
star
64

cakefest2021

Code examples for CakeFest 2021 Workshops
PHP
2
star
65

site-book

A simple repository containing the necessary config to deploy the api site
Python
2
star
66

docs-theme

Community theme for plugin documentation
CSS
2
star
67

site-api

A simple repository containing the necessary config to deploy the api site
Python
1
star
68

cakefest-2016-workshops

Repo to hold source code used during CakeFest 2016 Workshops
PHP
1
star
69

cakebot

CoffeeScript
1
star
70

code-of-conduct

Contributor Code of Conduct
1
star