private function fillArea(Area $area, $path)
    {
        $finder = new Finder($path);

        foreach (SortorderParser::parse($finder) as $subPath)
        {
            $contentFullPath = $path . DIRECTORY_SEPARATOR . $subPath;
            if(file_exists($contentFullPath))
            {
                //Detect file extension
                $type = substr($subPath, strrpos($subPath, '.') + 1);

                $area->addContentAsLast(
                    new Content(
                        $type,
                        substr($contentFullPath, strlen($this->contentPath))
                    )
                );
            }
            else
            {
                throw new  PageException("Unable to find content at [$contentFullPath]");
            }
        }
    }
private function fillArea(Area $area, $path)
    {
        $finder = new Finder($path);

        foreach (SortorderParser::parse($finder) as $subPath)
        {
            $contentFullPath = $path . DIRECTORY_SEPARATOR . $subPath;
            if(file_exists($contentFullPath))
            {
                //Detect file extension
                $type = substr($subPath, strrpos($subPath, '.') + 1);

                $area->addContentAsLast(
                    new Content(
                        $type,
                        substr($contentFullPath, strlen($this->contentPath))
                    )
                );
            }
            else
            {
                throw new  PageException("Unable to find content at [$contentFullPath]");
            }
        }
    }
private function fillArea ( Area $ area , $ path ) { $ finder = new Finder ( $ path ) ; foreach ( SortorderParser :: parse ( $ finder ) as $ subPath ) { $ contentFullPath = $ path . DIRECTORY_SEPARATOR . $ subPath ; if ( file_exists ( $ contentFullPath ) ) { //Detect file extension $ type = substr ( $ subPath , strrpos ( $ subPath , '.' ) + 1 ) ; $ area -> addContentAsLast ( new Content ( $ type , substr ( $ contentFullPath , strlen ( $ this -> contentPath ) ) ) ) ; } else { throw new PageException ( "Unable to find content at [$contentFullPath]" ) ; } } }
Fill area content from files

@param  Area   $area
@param  string $path Path from where to read sortorder file and content
Fill area content from files