AMYBundle::__construct PHP Method

__construct() public method

public __construct ( $supportPath, $name = 'default', $hostOS = 'Windows' )
    public function __construct($supportPath, $name = 'default', $hostOS = 'Windows')
    {
        $this->supportPath = $supportPath;
        $this->name = $name;
        $this->hostOS = $hostOS;
        $name = trim($name);
        if ('' == $name) {
            throw new Exception('Invalid bundle name.');
        }
        $this->bundlePath = $supportPath . '/bundles/' . strtolower($name) . '/';
        if (!is_dir($this->bundlePath)) {
            throw new Exception('Bundle `' . $name . '` not found at `' . $this->bundlePath . '`.');
        }
        $this->info = $this->loadYAML('info.amBundle', 'info');
        $this->dependencies = $this->info['signature']['dependencies'];
        $this->snippets_inherited = is_array($this->info['signature']['snippets_inherited']) ? $this->info['signature']['snippets_inherited'] : array();
    }