__construct() public method

public __construct ( $mediaId = null, $type = null, $referenceId = null, $dimensions = null, $urls = null, $mimeType = null, $sourceUrl = null, $name = null, $fileSize = null, $creationTime = null, $MediaType = null )
Example #1
0
 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);
 }
Example #2
0
 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'];
     }
 }
Example #3
0
 /**
  * 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());
     }
 }
Example #4
0
 /**
  * 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);
 }
Example #5
0
 /** 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;
 }
Example #6
0
 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);
     }
 }
Example #7
0
 /** 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;
 }
Example #8
0
 public function __construct($object = null)
 {
     parent::__construct($object);
     if ($object instanceof \stdClass) {
         $this->setFile($object->file);
         $this->setLastplayed($object->lastplayed);
         $this->setPlot($object->plot);
     }
 }
Example #9
0
 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));
     }
 }
Example #10
0
 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;
 }
Example #11
0
 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);
 }
 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;
 }
 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;
 }
Example #14
0
 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;
 }
Example #15
0
 /** 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;
 }
Example #16
0
 /**
  * Video constructor.
  * @param $mediaId
  * @param $name
  * @param array $urls
  * @param array $sourceUrl
  * @param $mimeType
  * @param array $dimensions
  */
 public function __construct($mediaId, $name, array $urls = null, $sourceUrl, $mimeType, array $dimensions)
 {
     parent::__construct($mediaId, $name, 'Image', $urls, $sourceUrl);
     $this->mimeType = $mimeType;
     $this->dimensions = $dimensions;
 }
Example #17
0
 public function __construct()
 {
     parent::__construct();
 }
Example #18
0
 /**
  * Video constructor.
  * @param $mediaId
  * @param $name
  * @param array $urls
  * @param array $sourceUrl
  */
 public function __construct($mediaId, $name, array $urls = null, $sourceUrl)
 {
     parent::__construct($mediaId, $name, 'Video', $urls, $sourceUrl);
 }
 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)
 {
     if (get_parent_class('Image')) {
         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;
 }
Example #20
0
 public function __construct($ID, $user, $title, $content, $visibility, \DateTime $date, $parentPage, $position)
 {
     if (!is_numeric($parentPage) && $parentPage != null || !is_numeric($position)) {
         throw new BreezedException("Incorrect datatype");
     }
     parent::__construct($ID, $user, $title, $content, $visibility, $date);
     $this->parentPage = $parentPage;
     $this->position = $position;
 }
Example #21
0
 /** Create an Artist object.
  *
  * @param string	$name		Username.
  * @param string	$url		Last.fm URL of this user.
  * @param string	$realName	Real name of this user.
  * @param string	$language	Language of this user.
  * @param string	$country	Country of this user.
  * @param integer	$age		Age of this user.
  * @param string	$gender		Gender of this user.
  * @param boolean	$subscriber	Subscriber status of this user.
  * @param integer	$playCount	Track play count of this user.
  * @param string	$playlists	Number of playlist of this user.
  * @param array		$images		An array of cover art images of different sizes.
  * @param Track		$lastTrack	Last track the user played.
  * @param float		$match		Similarity value.
  * @param integer	$weight		Still no idea.
  * @param integer	$registered	Registration date of this user.
  *
  * @access	public
  */
 public function __construct($name, $realName, $url, $language, $country, $age, $gender, $subscriber, $playCount, $playlists, array $images, $lastTrack, $match, $weight, $registered)
 {
     parent::__construct($name, '', $url, $images, 0, $playCount);
     $this->realName = $realName;
     $this->language = $language;
     $this->country = $country;
     $this->age = $age;
     $this->gender = $gender;
     $this->subscriber = $subscriber;
     $this->playlists = $playlists;
     $this->lastTrack = $lastTrack;
     $this->match = $match;
     $this->weight = $weight;
     $this->registered = $registered;
 }
Example #22
0
 public function __construct($id = null, $omschrijving = null, $pad = null)
 {
     parent::__construct($id, $omschrijving, $pad);
 }