45 if (!is_null($moduleDir)) {
46 $moduleDir = rtrim($moduleDir,
'\\/');
49 $this->_moduleDir = $moduleDir;
67 if (is_string($file)) {
68 $file = new \SplFileObject($file);
88 if (!is_null($this->_moduleDir)) {
89 $file = new \SplFileObject($this->_moduleDir .
'/modman');
102 if (!$file->isReadable()) {
103 throw new \ErrorException(sprintf(
'modman file "%s" not readable', $file->getPathname()));
120 foreach ($this->_file as
$row) {
123 if (
'' ===
$row || in_array(
$row[0], array(
'#',
'@'))) {
126 $parts = preg_split(
'/\s+/',
$row, 2, PREG_SPLIT_NO_EMPTY);
127 if (count($parts) != 2) {
128 throw new \ErrorException(sprintf(
'Invalid row on line %d has %d parts, expected 2', $line, count(
$row)));
translatePathMappings($mappings)
__construct($moduleDir=null, $translations=array(), $pathSuffix)