Overview

Namespaces

  • Net
    • Bazzline
      • Component
        • ApiDocumentBuilder
          • Builder
          • Command
          • Process
          • Requirement
          • Service

Classes

  • Net\Bazzline\Component\ApiDocumentBuilder\Builder\Apigen
  • Net\Bazzline\Component\ApiDocumentBuilder\Command\Builder
  • Net\Bazzline\Component\ApiDocumentBuilder\Command\CleanDirectory
  • Net\Bazzline\Component\ApiDocumentBuilder\Process\CreateNewProjectInTheCache
  • Net\Bazzline\Component\ApiDocumentBuilder\Requirement\CachedProjectHasChanges
  • Net\Bazzline\Component\ApiDocumentBuilder\Service\ApplicationLocator

Interfaces

  • Net\Bazzline\Component\ApiDocumentBuilder\Builder\BuilderInterface

Exceptions

  • Net\Bazzline\Component\ApiDocumentBuilder\Service\InvalidArgumentException
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 
<?php
/**
 * @author stev leibelt <artodeto@bazzline.net>
 * @since 2015-05-24 
 */

namespace Net\Bazzline\Component\ApiDocumentBuilder\Builder;

use Net\Bazzline\Component\Command\Command;

class Apigen extends Command implements BuilderInterface
{
    /** @var string */
    private $destinationPath;

    /** @var string */
    private $sourcePath;

    /** @var string */
    private $title;

    /**
     * @return array
     */
    public function build()
    {
        $options = array(
            '--source ' . $this->sourcePath,
            '--destination ' . $this->destinationPath,
            '--title "' . $this->title . '"'
        );

        $command = __DIR__ . '/../../../../../../vendor/bin/apigen generate ' . implode(' ', $options);

        return $this->execute($command);
    }

    /**
     * @param string $path
     * @return $this
     * @todo validation
     */
    public function setDestination($path)
    {
        $this->destinationPath = $path;

        return $this;
    }

    /**
     * @param string $path
     * @return $this
     * @todo validation
     */
    public function setSource($path)
    {
        $this->sourcePath = $path;

        return $this;
    }

    /**
     * @param string $title
     * @return $this
     * @todo validation
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }
}
PHP Api Document Builder by bazzline.net API documentation generated by ApiGen