2017 © Pedro Peláez
 

library framework

ClanCats Framework, because your time is precious. HMVC PHP framework.

image

clancats/framework

ClanCats Framework, because your time is precious. HMVC PHP framework.

  • Friday, April 21, 2017
  • by clancats
  • Repository
  • 7 Watchers
  • 32 Stars
  • 201 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 10 Versions
  • 1 % Grown

The README.md

ClanCats Framework 2.1, (*1)

Build Status License Downloads, (*2)

ClanCatsFramework, painless web development no overkill. HMVC PHP framework., (*3)

This is the Application repository if you like to contribute take a look at the core repository: https://github.com/ClanCats/Core, (*4)

Philosophy

There are a many brilliant frameworks out there and I don't want to reinvent the wheel. My vision of CCF is a:, (*5)

  • modern
  • well-architected
  • high performance
  • user friendly

full stack php framework., (*6)

User friendly or developer friendly is the core philosophy. The trick should be to keep the balance between the simplest and the best solution for a problem. I've been working on a lot big applications using Zend and Symfony2 and there was always the point where I looked at the code and thought:, (*7)

"wait so to generate a random string I need a class extending a container wich provides me the util service factory to create a new string util instance where i can execute the random string method on?"., (*8)

Often it's a complete overkill to reach a simple goal using these frameworks. So the goal of CCF is to make development comfortable instead of following 100% a convetion., (*9)

History

This PHP framework was originally build 2010 as the core of a social Plattform called "ClanCats". In 2012 I decided to split the core and the application apart, so CCF was born. After developing several application on CCF v1.0, the point has come to rethink the core structure and rewrite the entire thing to a new version that should go open source., (*10)

Installation

Setting up a new instance of CCF2 can be done simply with one command, or, in other words, with composer., (*11)

Run the following command to create a new CCF project., (*12)

$ composer create-project clancats/framework <your project name> --prefer-dist

Composer not installed? Read the installation guide here: https://getcomposer.org/download/, (*13)

Requirements

To run this framework please check the following requirements:, (*14)

  • PHP >= 5.3.9
  • PHP JSON
  • PHP MCrypt
  • PHP Multibyte String
  • Apache with mod_rewrite or Nginx

Permissions

For some operations ( storage, packtacular etc. ) we may need to grant write permissions in the file system., (*15)

Storage: /CCF/storage/br/ Packtacular: /public/assets/packtacular/, (*16)

You can also set these using the cli doctor., (*17)

$ php cli doctor::permissions

If you get an error setting the permissions try to run the that command with sudo., (*18)


Structure

In the new CCF2 folder structure we split some things apart to make deployment much more efficient.br/, (*19)

 - CCF/
   - app/                // Your Application 
   - core/               // The CCF Core
   - orbit/              // Orbit ships ( plugins / modules ) 
   - storage/            // Internal file storage for logs, cache etc.
   - vendor/             // Composer vendor

 - boot/
   - environment.php     // The Environment configuration
   - paths.php           // Framework paths configuration

 - cli                   // Command line utility
 - composer.json
 - framework.php
 - phpunit.xml

 - public/
   - index.php           // Web Application public

Configuration

There is usually no configuration required to just run the framework (depending on your environment). We do, however, recommend to do some configuration before you start developing your awesome application., (*20)

Boot

The boot configuration allow you change the core behavior of the CCF., (*21)

Environment

Define how your application detects the environment.br/ You can create an entirely new script of your own to return the runtime environment or you can make use of the env detector., (*22)

/boot/environment.php

Check out the environment docs: Environment, (*23)

Paths

Plan on running multiple CCF installations on one machine? Using just a single core? This is no problem because you can modify the CCF paths., (*24)

/boot/paths.php

You are also free to add new paths. Adding a new element to the array will add the path to runtime and also create a path define:, (*25)

<value> = <value>PATH
test = TESTPATH

main config

You will find an initial main configuration file under:, (*26)

/CCF/app/config/main.config.php

Security Salt

At several points CCF is going to encrypt certain things by employing salt. You should define your own salt to keep your application secure., (*27)

You can generate a random salt using the following command:, (*28)

$ php cli doctor::security_key

When using composer to create a new project the salt is generated automatically., (*29)

Otherwise you will find the key under security in the main configuration:, (*30)

'security' => array(
    'salt' => 'L~7(%(9=@9+8u.Oo4+ysT45fkA4,82',
),

Path offset

Maybe you would like to run your application from somewhere other than the domain root, e.g. from a subfolder. forums., (*31)

// www.yourdomain.com/forums/
'url'   => array(
    'path'      => '/forums/',
),

For everything else, check out the main configuration documents: Configuration, (*32)


Routing

Depending on your system you will need to set something up so that all public requests end on the public/index.php file., (*33)

CCF ships with an .htaccess for apache systems with mod_rewrite enabled:, (*34)

RewriteEngine On
# RewriteBase /subdir/

# Only Rewrite URL if file not exits
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Default
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

The Versions

21/04 2017

dev-CCF3.0

dev-CCF3.0 http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

28/02 2015

dev-master

9999999-dev http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

09/02 2015

dev-CCF2.1

dev-CCF2.1 http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

16/09 2014

v2.0.6

2.0.6.0 http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

17/08 2014

v2.0.4

2.0.4.0 http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

25/07 2014

v2.0.3

2.0.3.0 http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

22/07 2014

v2.0.2

2.0.2.0 http://www.clancats.io

ClanCats Framework, because your time is precious. HMVC PHP framework.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

12/07 2014

v2.0.1

2.0.1.0 http://www.clancats.com

ClanCats Framework, efficiency, clarity and performence.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

27/06 2014

v2.0

2.0.0.0 http://www.clancats.com

ClanCats Framework, efficiency, clarity and performence.

  Sources   Download

MIT

The Requires

 

framework ccf clancats

05/06 2014

v1.0-beta1

1.0.0.0-beta1 http://www.clancats.com

ClanCats Framework, efficiency, clarity and performence.

  Sources   Download

MIT

The Requires

 

framework ccf clancats