-
-
Notifications
You must be signed in to change notification settings - Fork 811
Importing Namespaces
Carson Full edited this page Feb 21, 2015
·
1 revision
For type-hinting parameters and creating objects, use only the imported class name.
For the PHPDoc, use the fully qualified namespace (FQN). Note the leading slash.
use Silex\Application;
/**
* @param $app \Silex\Application
*/
public function __construct(Application $app) { }
If the namespace is really long though, the imported class name can be used.
use Symfony\Component\Console\Output\OutputInterface;
/**
* @param $output OutputInterface
*/
public function __construct(OutputInterface $output) { }
If the class name is ambiguous without part of the namespace, that piece should be included.
use Bolt\Controllers;
/**
* @param $controller Controllers\Extend
*/
public function __construct(Controllers\Extend $controller) { }
- Bolt Wiki Home
- Tuesday Dev meetings
- Curated list of articles and tutorials
- Bolt internationalisation (i18n)
- Bolt Style Guide
- Roadmap
- TODOs
- [Tests] Unit & Functional Split
- [Tests] Code Coverage
- Core Team
- Bug/feature Process
-
Release Process
- Branching
- Packaging release builds