-
Notifications
You must be signed in to change notification settings - Fork 1
Basic concepts # Namespaces
hertsch edited this page Sep 17, 2013
·
4 revisions
The kitFramework is depending on PHP 5.3 and makes use of namespaces.
Beside the namespaces assigned to the Silex and Symfony components the kitFramework defines two basic namespaces:
-
phpManufaktur- reserved for applications and extensions contributed by the phpManufaktur, -
thirdParty- reserved for applications and extensions contributed by any third party company or author.
To create an extension MyExtension, first create a directory:
/kit2/extension/thirdparty/thirdParty/MyExtension
create a bootstrap.include.php and a route to your controller class MyController.php and place it at:
/kit2/extension/thirdparty/thirdParty/MyExtension/Control
namespace thirdParty\MyExtension;
use Silex\Application;
class MyController
{
protected $app = null;
public function __construct(Application $app)
{
$this->app = $app;
}
}
The kitFramework will take care of autoloading your class.
Namespaces are also used for Templates (see next chapter)!
- If you spot a typo or want to contribute an article, a how-to or a tip, please feel free to edit the Wiki directly
- If you you have any question or suggestion, please contact the phpManufaktur Support Group
This Documentation is part of the KIT2 Project
© 2013 by phpManufaktur, kitFramework is published under MIT license.
- Silex Documentation
- Silex API
- Twig Template Engine
- Twig Short Reference
- Symfony Form Factory
- Doctrine DBAL
- Swift Mailer
- Requirements
- Installation
- .htaccess
- Configuration
- Constants
- Utilities
- Twig Extensions
- kitFramework API