__construct() public method

public __construct ( BytesIO $stream, $simple = false )
$stream BytesIO
Exemplo n.º 1
0
 /**
  * Create a new newspaper writer Instance.
  * @param array $settings configuration settings.
  */
 public function __construct($settings)
 {
     parent::__construct($settings);
     $this->fetcher = new \mik\fetchers\Cdm($settings);
     $this->alias = $settings['WRITER']['alias'];
     $fileGetterClass = 'mik\\filegetters\\' . $settings['FILE_GETTER']['class'];
     $this->cdmSingleFileFileGetter = new $fileGetterClass($settings);
 }
Exemplo n.º 2
0
 function __construct($core, $start_params = array())
 {
     parent::__construct($core);
     $this->db = $this->db_object($core);
     if (isset($start_params['db'])) {
         $this->db_params = $start_params['db'];
     }
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param string $filepath a relative or absolute path to the file.
  *
  * @param string $delimiter the delimiter that separates columns in the file.
  *
  * @param string $enclosure (optional, default value is '"') the character that is used for
  *    enclosing column values.
  *
  * @param string $escape (optional, default value is '\') the character used for escaping.
  *
  * @param string $mode the file mode (see PHPs fopen() $mode parameter;
  *   http://php.net/manual/de/function.fopen.php)
  *
  * For `$delimiter`, `$enclosure`, and `$escape` see also http://php.net/manual/en/function.str-getcsv.php.
  */
 public function __construct($filepath, $delimiter, $enclosure = '"', $escape = "\\", $mode = 'w')
 {
     parent::__construct($filepath, $mode);
     $this->delimiter = $delimiter;
     $this->enclosure = $enclosure;
     $this->escape = $escape;
     $this->header = null;
 }
Exemplo n.º 4
0
 /**
  * Create a new newspaper writer Instance
  * @param array $settings configuration settings.
  */
 public function __construct($settings)
 {
     parent::__construct($settings);
     $this->fetcher = new \mik\fetchers\Cdm($settings);
     $fileGetterClass = 'mik\\filegetters\\' . $settings['FILE_GETTER']['class'];
     $this->fileGetter = new $fileGetterClass($settings);
     $this->output_directory = $settings['WRITER']['output_directory'];
     $this->modsValidator = new \mik\filemanipulators\ValidateMods($settings);
 }
Exemplo n.º 5
0
 /**
  * Create a new newspaper writer Instance
  * @param array $settings configuration settings.
  */
 public function __construct($settings)
 {
     parent::__construct($settings);
     $this->fetcher = new \mik\fetchers\Cdm($settings);
     $fileGetterClass = 'mik\\filegetters\\' . $settings['FILE_GETTER']['class'];
     $this->fileGetter = new $fileGetterClass($settings);
     $this->output_directory = $settings['WRITER']['output_directory'];
     $this->preserve_content_filenames = $settings['WRITER']['preserve_content_filenames'];
 }
Exemplo n.º 6
0
 /**
  * Create a new newspaper writer Instance
  * @param array $settings configuration settings.
  */
 public function __construct($settings)
 {
     parent::__construct($settings);
     $this->fetcher = new \mik\fetchers\Cdm($settings);
     $this->alias = $settings['WRITER']['alias'];
     // @Todo load manipulators someway based on those to be listed in config.
     $this->thumbnail = new \mik\filemanipulators\ThumbnailFromCdm($settings);
     $fileGetterClass = 'mik\\filegetters\\' . $settings['FILE_GETTER']['class'];
     $this->cdmNewspapersFileGetter = new $fileGetterClass($settings);
     if (isset($this->settings['metadata_filename'])) {
         $this->metadataFileName = $this->settings['metadata_filename'];
     } else {
         $this->metadataFileName = 'MODS.xml';
     }
 }
Exemplo n.º 7
0
 /**
  * Create a new newspaper writer Instance
  * @param array $settings configuration settings.
  */
 public function __construct($settings)
 {
     parent::__construct($settings);
     $this->fetcher = new \mik\fetchers\Cdm($settings);
     $this->alias = $settings['WRITER']['alias'];
     // @Todo load manipulators someway based on those to be listed in config.
     $this->thumbnail = new \mik\filemanipulators\ThumbnailFromCdm($settings);
     $fileGetterClass = 'mik\\filegetters\\' . $settings['FILE_GETTER']['class'];
     $this->cdmNewspapersFileGetter = new $fileGetterClass($settings);
     if (isset($this->settings['metadata_filename'])) {
         $this->metadataFileName = $this->settings['metadata_filename'];
     } else {
         $this->metadataFileName = 'MODS.xml';
     }
     // If OBJ_file_extension was not set in the configuration, default to tiff.
     if (!isset($this->OBJ_file_extension)) {
         $this->OBJ_file_extension = 'tiff';
     }
     $metadtaClass = 'mik\\metadataparsers\\' . $settings['METADATA_PARSER']['class'];
     $this->metadataParser = new $metadtaClass($settings);
 }
Exemplo n.º 8
0
 function __construct($core, $storage)
 {
     parent::__construct($core);
     $this->storage = $storage;
 }
Exemplo n.º 9
0
 public function __construct(Formater $formater, PDO $db)
 {
     parent::__construct($formater);
     $this->db = $db;
 }