Class Socialveo\Core\helpers\MediaHelper

InheritanceSocialveo\Core\helpers\MediaHelper
Uses TraitsSocialveo\Core\Translatable

Class MediaHelper

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
truncateFileName() Truncate filename Socialveo\Core\helpers\MediaHelper

Method Details

create() public static method

Create media

public static Socialveo\Core\models\Media create ( $file, Socialveo\Core\models\User $user, $network, $targetUuid null, $targetType null, $properties null )
$file Phalcon\Http\Request\File|null
$user Socialveo\Core\models\User
$network Socialveo\Core\models\Network|Socialveo\Core\models\MessagesDialogs
$targetUuid string|null|null
$targetType mixed
$properties string|null
return Socialveo\Core\models\Media

On success or throws exceptions on failure

throws Exception

while error occurred during uploading files or saving model

getCdnUrl() public static method

Get cdn url

public static string getCdnUrl ( $filename )
$filename string
getNetworkGroupDate() public static method

public static Socialveo\Core\models\Media[] getNetworkGroupDate ( Socialveo\Core\models\Network $network, $page, $type null, $limit 20 )
$network Socialveo\Core\models\Network
$page integer
$type string

[optional] Media type

$limit integer

[optional]

getUserGroupDate() public static method

public static Socialveo\Core\models\Media[] getUserGroupDate ( Socialveo\Core\models\User $user, $page, $type null, $limit 20 )
$user Socialveo\Core\models\User
$page integer
$type string

[optional] Media type

$limit integer

[optional]

truncateFileName() protected static method

Truncate filename

protected static string truncateFileName ( $filename, $length 30 )
$filename string
$length integer

[optional]