当前位置: 首页>>代码示例>>PHP>>正文


PHP Media::__construct方法代码示例

本文整理汇总了PHP中Media::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Media::__construct方法的具体用法?PHP Media::__construct怎么用?PHP Media::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Media的用法示例。


在下文中一共展示了Media::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct($file, $mimeType = null)
 {
     $message = "CssMedia::__construct - ";
     $message .= "All functionality related to assets has been deprecated.";
     trigger_error($message, E_USER_NOTICE);
     parent::__construct($file, $mimeType);
 }
开发者ID:razzman,项目名称:media,代码行数:7,代码来源:CssMedia.php

示例2: __construct

 public function __construct($params = null)
 {
     parent::__construct();
     if (isset($params['utility'])) {
         $this->utility = $params['utility'];
     } else {
         $this->utility = new Utility();
     }
     if (isset($params['url'])) {
         $this->url = $params['url'];
     } else {
         $this->url = new Url();
     }
     if (isset($params['image'])) {
         $this->image = $params['image'];
     } else {
         $this->image = getImage();
     }
     if (isset($params['user'])) {
         $this->user = $params['user'];
     } else {
         $this->user = new User();
     }
     if (isset($params['config'])) {
         $this->config = $params['config'];
     }
 }
开发者ID:gg1977,项目名称:frontend,代码行数:27,代码来源:Photo.php

示例3: __construct

 /**
  * Constructor
  *
  * @access public
  * @author Oliver Lillie
  * @param  string $audio_file_path The path to the audio file.
  * @param  PHPVideoToolkit\Config $config The config object.
  * @param  PHPVideoToolkit\AudioFormant $audio_input_format The input format object to use, if any. Otherwise null
  * @param  boolean $ensure_audio_file If true an additional check is made to ensure the the given file is actually an audio file.
  * @throws \LogicException If $ensure_audio_file is true but the file is not audio.
  */
 public function __construct($audio_file_path, Config $config = null, AudioFormat $audio_input_format = null, $ensure_audio_file = true)
 {
     parent::__construct($audio_file_path, $config, $audio_input_format);
     //          validate this media file is an audio file
     if ($ensure_audio_file === true && $this->_validateMedia('audio') === false) {
         throw new \LogicException('You cannot use an instance of ' . get_class($this) . ' for "' . $audio_file_path . '" as the file is not an audio file. It is reported to be a ' . $this->readType());
     }
 }
开发者ID:kunitwru,项目名称:phpvideotoolkit-v2,代码行数:19,代码来源:Audio.php

示例4: __construct

 /**
  * Constructor
  *
  * @param Files The parent files collection
  * @param string The filename
  */
 public function __construct(Files $files, $filename)
 {
     $this->site = $files->site();
     $this->page = $files->page();
     $this->files = $files;
     $this->root = $this->files->page()->root() . DS . $filename;
     parent::__construct($this->root);
 }
开发者ID:gBokiau,项目名称:kirby,代码行数:14,代码来源:file.php

示例5: __construct

 /** Create an album object.
  *
  * @param mixed		$artist			An artist object or string.
  * @param string	$name			Name of this album.
  * @param integer	$id				ID of this album.
  * @param string	$mbid			MusicBrainz ID of this album.
  * @param string	$url			Last.fm URL of this album.
  * @param array		$images			An array of cover art images of different sizes.
  * @param integer	$listeners		Number of listeners of this album.
  * @param integer	$playCount		Play count of this album.
  * @param integer	$releaseDate	Release date of this album.
  * @param array		$topTags		An array of top tags of this album.
  *
  * @access	public
  */
 public function __construct($artist, $name, $id, $mbid, $url, array $images, $listeners, $playCount, $releaseDate, array $topTags)
 {
     parent::__construct($name, $mbid, $url, $images, $listeners, $playCount);
     $this->artist = $artist;
     $this->id = $id;
     $this->releaseDate = $releaseDate;
     $this->topTags = $topTags;
 }
开发者ID:niczak,项目名称:php-last.fm-api,代码行数:23,代码来源:Album.php

示例6: __construct

 public function __construct($video_file_path, Config $config = null, ImageFormat $video_input_format = null, $ensure_image_file = true)
 {
     parent::__construct($video_file_path, $config, $video_input_format);
     //			validate this media file is a image file
     if ($ensure_image_file === true && $this->_validateMedia('image') === false) {
         throw new Exception('You cannot use an instance of ' . get_class($this) . ' for "' . $image_file_path . '" as the file is not a image file. It is reported to be a ' . $type);
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:8,代码来源:Image.php

示例7: __construct

 /** Create an Artist object.
  *
  * @param string	$name		Name of this artist.
  * @param string	$mbid		MusicBrainz ID of this artist.
  * @param string	$url		Last.fm URL of this artist.
  * @param array		$images		An array of cover art images of different sizes.
  * @param boolean	$streamable	Is this artist streamable?
  * @param integer	$listeners	Number of listeners of this artist.
  * @param integer	$playCount	Play count of this artist.
  * @param array		$tags		An array of tags of this artist.
  * @param array		$similar	An array of similar artists.
  * @param string	$biography	Biography of this artist.
  * @param float		$match		Similarity value.
  *
  * @access	public
  */
 public function __construct($name, $mbid, $url, array $images, $streamable, $listeners, $playCount, array $tags, array $similar, $biography, $match)
 {
     parent::__construct($name, $mbid, $url, $images, $listeners, $playCount);
     $this->streamable = $streamable;
     $this->tags = $tags;
     $this->similar = $similar;
     $this->biography = $biography;
     $this->match = $match;
 }
开发者ID:niczak,项目名称:php-last.fm-api,代码行数:25,代码来源:Artist.php

示例8: __construct

 public function __construct($object = null)
 {
     parent::__construct($object);
     if ($object instanceof \stdClass) {
         $this->setFile($object->file);
         $this->setLastplayed($object->lastplayed);
         $this->setPlot($object->plot);
     }
 }
开发者ID:rejinka,项目名称:xbmc-api,代码行数:9,代码来源:Item.php

示例9: __construct

 public function __construct($path)
 {
     $this->kirby = kirby::instance();
     if (is_a($path, 'Media')) {
         parent::__construct($path->root(), $path->url());
     } else {
         parent::__construct(url::isAbsolute($path) ? null : $this->kirby->roots()->index() . DS . ltrim($path, DS), url::makeAbsolute($path));
     }
 }
开发者ID:kgchoy,项目名称:main-portfolio-website,代码行数:9,代码来源:asset.php

示例10: __construct

 public function __construct($video_file_path, Config $config = null, VideoFormat $video_input_format = null, $ensure_video_file = true)
 {
     parent::__construct($video_file_path, $config, $video_input_format);
     //			validate this media file is a video file
     if ($ensure_video_file === true && $this->_validateMedia('video') === false) {
         throw new Exception('You cannot use an instance of ' . get_class($this) . ' for "' . $video_file_path . '" as the file is not a video file. It is reported to be a ' . $type);
     }
     $this->_extracting_frames = false;
     $this->_extracting_frame = false;
     $this->_extracting_audio = false;
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:11,代码来源:Video.php

示例11: __construct

 public function __construct(User $user)
 {
     // store the parent user object
     $this->user = $user;
     // this should rather be coming from the user object
     $this->kirby = kirby::instance();
     // try to find the avatar
     if ($file = f::resolve($this->kirby->roots()->avatars() . DS . $user->username(), ['jpg', 'jpeg', 'gif', 'png'])) {
         $filename = f::filename($file);
     } else {
         $filename = $user->username() . '.jpg';
         $file = $this->kirby->roots()->avatars() . DS . $filename;
     }
     parent::__construct($file, $this->kirby->urls()->avatars() . '/' . $filename);
 }
开发者ID:kgchoy,项目名称:main-portfolio-website,代码行数:15,代码来源:avatar.php

示例12: __construct

 public function __construct($data = null, $mediaId = null, $type = null, $referenceId = null, $dimensions = null, $urls = null, $mimeType = null, $sourceUrl = null, $name = null, $fileSize = null, $creationTime = null, $MediaType = null)
 {
     parent::__construct();
     $this->data = $data;
     $this->mediaId = $mediaId;
     $this->type = $type;
     $this->referenceId = $referenceId;
     $this->dimensions = $dimensions;
     $this->urls = $urls;
     $this->mimeType = $mimeType;
     $this->sourceUrl = $sourceUrl;
     $this->name = $name;
     $this->fileSize = $fileSize;
     $this->creationTime = $creationTime;
     $this->MediaType = $MediaType;
 }
开发者ID:sonicgd,项目名称:google-adwords-api-light,代码行数:16,代码来源:Image.php

示例13: __construct

 public function __construct($durationMillis = null, $streamingUrl = null, $readyToPlayOnTheWeb = null, $mediaId = null, $type = null, $referenceId = null, $dimensions = null, $urls = null, $mimeType = null, $sourceUrl = null, $name = null, $fileSize = null, $creationTime = null, $MediaType = null)
 {
     parent::__construct();
     $this->durationMillis = $durationMillis;
     $this->streamingUrl = $streamingUrl;
     $this->readyToPlayOnTheWeb = $readyToPlayOnTheWeb;
     $this->mediaId = $mediaId;
     $this->type = $type;
     $this->referenceId = $referenceId;
     $this->dimensions = $dimensions;
     $this->urls = $urls;
     $this->mimeType = $mimeType;
     $this->sourceUrl = $sourceUrl;
     $this->name = $name;
     $this->fileSize = $fileSize;
     $this->creationTime = $creationTime;
     $this->MediaType = $MediaType;
 }
开发者ID:anton-github,项目名称:google-adwords-api-light,代码行数:18,代码来源:Audio.php

示例14: __construct

 public function __construct($durationMillis = null, $streamingUrl = null, $readyToPlayOnTheWeb = null, $industryStandardCommercialIdentifier = null, $advertisingId = null, $youTubeVideoIdString = null, $mediaId = null, $type = null, $referenceId = null, $dimensions = null, $urls = null, $mimeType = null, $sourceUrl = null, $name = null, $fileSize = null, $creationTime = null, $MediaType = null)
 {
     parent::__construct();
     $this->durationMillis = $durationMillis;
     $this->streamingUrl = $streamingUrl;
     $this->readyToPlayOnTheWeb = $readyToPlayOnTheWeb;
     $this->industryStandardCommercialIdentifier = $industryStandardCommercialIdentifier;
     $this->advertisingId = $advertisingId;
     $this->youTubeVideoIdString = $youTubeVideoIdString;
     $this->mediaId = $mediaId;
     $this->type = $type;
     $this->referenceId = $referenceId;
     $this->dimensions = $dimensions;
     $this->urls = $urls;
     $this->mimeType = $mimeType;
     $this->sourceUrl = $sourceUrl;
     $this->name = $name;
     $this->fileSize = $fileSize;
     $this->creationTime = $creationTime;
     $this->MediaType = $MediaType;
 }
开发者ID:nediam,项目名称:adwords-lib,代码行数:21,代码来源:Video.php

示例15: __construct

 /** Create an album object.
  *
  * @param mixed		$artist		An artist object or string.
  * @param mixed		$album		An album object or string.
  * @param string	$name		Name of this track.
  * @param string	$mbid		MusicBrainz ID of this track.
  * @param string	$url		Last.fm URL of this track.
  * @param array		$images		An array of cover art images of different sizes.
  * @param integer	$listeners	Number of listeners of this track.
  * @param integer	$playCount	Play count of this album.
  * @param integer	$duration	Duration of this track.
  * @param array		$topTags	An array of top tags of this track.
  * @param integer	$id			ID of this track.
  * @param string	$location	Location of this track.
  * @param boolean	$streamable	Track is streamable.
  * @param boolean	$fullTrack	Track is a full streamable track.
  * @param string	$wiki		Wiki data of this track.
  * @param integer	$lastPlayed	When this track was last played.
  *
  * @access	public
  */
 public function __construct($artist, $album, $name, $mbid, $url, array $images, $listeners, $playCount, $duration, array $topTags, $id, $location, $streamable, $fullTrack, $wiki, $lastPlayed)
 {
     parent::__construct($name, $mbid, $url, $images, $listeners, $playCount);
     $this->artist = $artist;
     $this->album = $album;
     $this->duration = $duration;
     $this->topTags = $topTags;
     $this->id = $id;
     $this->location = $location;
     $this->streamable = $streamable;
     $this->fullTrack = $fullTrack;
     $this->wiki = $wiki;
     $this->lastPlayed = $lastPlayed;
 }
开发者ID:niczak,项目名称:php-last.fm-api,代码行数:35,代码来源:Track.php


注:本文中的Media::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。