存储PHP OOP类

I have a site which uses the library file lib.client.php which is stored in the php folder in my standard website root and contains a series of classes I have built.

The library file contains about 5 or so classes, should I leave this file as one or break up the classes into their own files and include them all individually? Are there any best practice naming conventions I should use for these file(s)?

(As you can see at the moment I'm using lib. and I also use inc. - only because I have seen it done a few times before).

UPDATE:

I am remodelling my structure to comply with the PSR-0 Standard. I now have:

  • CCall (Vendor)
    • Core
      • Connection
        • Gateway.php
        • GatewayDSN.php
        • GatewayException.php
    • Components
      • Environment.php
      • EnvironmentRequest.php
      • Centre.php
      • Access
        • User.php
        • UserSession.php
      • RenderException.php

I want to create a new Environment() in index.php, and its __construct method calls Gateway::checkInstance().

  1. How would I manage namespace use in this model? What would have its own namespace and where would I define this?
  2. How would I use an autoload with these namespace definitions (and where?)
  3. Is there an equivalent standard for method and property naming?

I am using this https://gist.github.com/jwage/221634/download#

Break classes into their own files and follow the PSR-0 standard as a best practice. http://phpmaster.com/autoloading-and-the-psr-0-standard/

If you are using a PSR-0 autoload:

add this in Environment.php

namespace Components;

and add a reference to Gateway

use Core\Connection\Gateway;

of course you need this line inside Gateway.php

namespace Core\Connection;

Then:

new Components\Environment();