public function getUniqueName()
    {
        $key = 'uniq';

        // Lazy initialization
        if (!isset($this->container[$key])) {
            $extension = $this->getExtension();

            // If extension avaiable, use it
            if ($extension) {
                $name = sprintf('%s.%s', uniqid(), $extension);
            } else {
                // Otherwise just filename without extension
                $name = uniqid();
            }

            $this->container[$key] = $name;
        }

        return $this->container[$key];
    }
public function getUniqueName()
    {
        $key = 'uniq';

        // Lazy initialization
        if (!isset($this->container[$key])) {
            $extension = $this->getExtension();

            // If extension avaiable, use it
            if ($extension) {
                $name = sprintf('%s.%s', uniqid(), $extension);
            } else {
                // Otherwise just filename without extension
                $name = uniqid();
            }

            $this->container[$key] = $name;
        }

        return $this->container[$key];
    }
public function getUniqueName ( ) { $ key = 'uniq' ; // Lazy initialization if ( ! isset ( $ this -> container [ $ key ] ) ) { $ extension = $ this -> getExtension ( ) ; // If extension avaiable, use it if ( $ extension ) { $ name = sprintf ( '%s.%s' , uniqid ( ) , $ extension ) ; } else { // Otherwise just filename without extension $ name = uniqid ( ) ; } $ this -> container [ $ key ] = $ name ; } return $ this -> container [ $ key ] ; }
Returns unique name for uploaded file

@return string
Returns unique name for uploaded file