public function getNormalizedPath() { if (!isset($this->normalizedPath)) { $this->normalizedPath = PatternLab::normalizePath($this->getPath()); } return $this->normalizedPath; }
protected function makeIndex(PatternLabInterface $patternlab) { $this->index = []; foreach ($patternlab->getPatterns() as $pattern) { $file = $pattern->getFile(); $partial = $pattern->getPartial(); $path = PatternLab::normalizePath($pattern->getPath()); $this->index[$partial] = $file; $this->index[$path] = $file; } }
/** * @param $path * @return SubtypeInterface */ protected function getOrCreateSubtype($path) { list(, $key) = explode('/', PatternLab::normalizePath($path)); if (!isset($this->items[$key])) { $this->items[$key] = new Subtype($path); } return $this->items[$key]; }