本文整理汇总了PHP中Writer::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Writer::__construct方法的具体用法?PHP Writer::__construct怎么用?PHP Writer::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Writer
的用法示例。
在下文中一共展示了Writer::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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);
}
示例2: array
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'];
}
}
示例3: __construct
/**
* 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;
}
示例4: __construct
/**
* 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);
}
示例5: __construct
/**
* 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'];
}
示例6: __construct
/**
* 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';
}
}
示例7: __construct
/**
* 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);
}
示例8:
function __construct($core, $storage)
{
parent::__construct($core);
$this->storage = $storage;
}
示例9: __construct
public function __construct(Formater $formater, PDO $db)
{
parent::__construct($formater);
$this->db = $db;
}