예제 #1
0
파일: Writer.php 프로젝트: stdtabs/phptabs
 /**
  * Builds content in $format
  * 
  * @param string $format
  *
  * @return string A binary chain
  * 
  * @throws Exception if output format is not supported
  */
 public function build($format)
 {
     if (!isset($this->writers[$format])) {
         $message = sprintf('Output format %s is not supported', $format);
         throw new Exception($message);
     }
     return (new $this->writers[$format]($this->tablature->getSong()))->getContent();
 }
예제 #2
0
파일: Dumper.php 프로젝트: stdtabs/phptabs
 /**
  * @param Tablature The tablature to dump
  */
 public function __construct(Tablature $tablature)
 {
     $this->song = $tablature->getSong();
 }