If the file received is an object or array, check if the 'title' field is set

@return string
11274
protected function parseTitle() {
    if (is_object($this->file)) {
      if (isset($this->file->title)) {
        return $this->file->title;
      }
    }

    if (is_array($this->file)) {
      if (isset($this->file['title'])) {
        return $this->file['title'];
      }
    }

    return '';
  }
64223
public function getTitleNamed()
    {
        return !isset(self::getTitles()[$this->title]) ?: self::getTitles()[$this->title];
    }
341243
public function asString()
    {
        $tmp = new \SplTempFileObject;

        foreach ($this->data as $row) {
            $tmp->fputcsv($row, $this->delimiter);

            if ($this->lineEnding !== "\n") {
                $tmp->fseek(-1, \SEEK_CUR);
                $tmp->fwrite($this->lineEnding);
            }
        }

        # Find out how much data we have written
        $length = $tmp->ftell();
        if ($length < 1) {
            return "";
        }

        # Reset the internal pointer and return all the data we have written
        $tmp->fseek(0);
        return $tmp->fread($length);
    }
159038
public function title()
    {
        if (isset($this->title)) {
            return $this->title;
        }

        try {
            $config = $this->dashboardConfig();

            if (isset($config['title'])) {
                $this->title = $this->translator()->translation($config['title']);

                return $this->title;
            }
        } catch (Exception $e) {
            $this->logger->error($e->getMessage());
        }

        $obj = $this->obj();
        $metadata = $obj->metadata();
        $objLabel = null;

        if (!$objLabel && isset($metadata['admin']['forms'])) {
            $adminMetadata = $metadata['admin'];

            $formIdent = filter_input(INPUT_GET, 'form_ident', FILTER_SANITIZE_STRING);
            if (!$formIdent) {
                $formIdent = (isset($adminMetadata['default_form']) ? $adminMetadata['default_form'] : '');
            }

            if (isset($adminMetadata['forms'][$formIdent]['label'])) {
                $objLabel = $this->translator()->translation($adminMetadata['forms'][$formIdent]['label']);
            }
        }

        if (!$objLabel) {
            $objType = (isset($metadata['labels']['singular_name']) ?
                $this->translator()->translation($metadata['labels']['singular_name']) : null);

            $objLabel = $this->translator()->translation('Documentation: {{ objType }}');

            if ($objType) {
                $objLabel = strtr($objLabel, [
                    '{{ objType }}' => $objType
                ]);
            }
        }

        if ($obj->view()) {
            $this->title = $obj->render((string)$objLabel, $obj);
        } else {
            $this->title = (string)$objLabel;
        }

        return $this->title;
    }
1147935
protected function parseTar()
	{
		$tarLength = strlen( $this->content );																// Read Files from archive
		$mainOffset = 0;
		while( $mainOffset < $tarLength )
		{
			if(substr($this->content,$mainOffset,512) == str_repeat(chr(0),512))							// If we read a block of 512 nulls, we are at the end of the archive
				break;
			$fileName		= $this->parseNullPaddedString(substr($this->content,$mainOffset,100));			// Parse file name
			$fileMode		= substr($this->content,$mainOffset + 100,8);									// Parse the file mode
			$fileUid		= octdec(substr($this->content,$mainOffset + 108,8));							// Parse the file user ID
			$fileGid		= octdec(substr($this->content,$mainOffset + 116,8));							// Parse the file group ID
			$fileSize		= octdec(substr($this->content,$mainOffset + 124,12));							// Parse the file size
			$fileTime		= octdec(substr($this->content,$mainOffset + 136,12));							// Parse the file update time - unix timestamp format
			$fileChksum	= octdec(substr($this->content,$mainOffset + 148,6));								// Parse Checksum
			$fileUname		= $this->parseNullPaddedString(substr($this->content,$mainOffset + 265,32));	// Parse user name
			$fileGname		= $this->parseNullPaddedString(substr($this->content,$mainOffset + 297,32));	// Parse Group name
			if($this->computeUnsignedChecksum(substr($this->content,$mainOffset,512)) != $fileChksum)		// Make sure our file is valid
				return false;
			$filecontents		= substr($this->content,$mainOffset + 512,$fileSize);						// Parse File Contents
			if( $fileSize > 0 )
			{
				if(!$this->containsFile( $fileName ) )
				{
					$this->numFiles++;																		// Increment number of files
					$activeFile = &$this->files[];															// Create us a new file in our array
					$activeFile['name']			= $fileName;												// Asign Values
					$activeFile['mode']			= $fileMode;
					$activeFile['size']			= $fileSize;
					$activeFile['time']			= $fileTime;
					$activeFile['user_id']		= $fileUid;
					$activeFile['group_id']		= $fileGid;
					$activeFile['user_name']	= $fileUname;
					$activeFile['group_name']	= $fileGname;
					$activeFile['checksum']		= $fileChksum;
					$activeFile['file']			= $filecontents;
				}
			}
			else
			{
				if( !$this->containsFolder( $fileName ) )
				{
					$this->numFolders++;																	// Increment number of directories
					$activeDir = &$this->folders[];															// Create a new folder in our array
					$activeDir['name']			= $fileName;												// Assign values
					$activeDir['mode']			= $fileMode;
					$activeDir['time']			= $fileTime;
					$activeDir['user_id']		= $fileUid;
					$activeDir['group_id']		= $fileGid;
					$activeDir['user_name']		= $fileUname;
					$activeDir['group_name']	= $fileGname;
					$activeDir['checksum']		= $fileChksum;
				}
			}
			$mainOffset += 512 + ( ceil( $fileSize / 512 ) * 512 );												// Move our offset the number of blocks we have processed
		}
		return true;
	}
1079380
public function getTitleFields(array $fields)
    {
        $fields = array_map(function ($field) {
            if (str_contains($field, '.')) {
                return object_get($this, $field); // this acts as a delimiter, which we can replace with /
            } else {
                return $this->{$field};
            }
        }, $fields);

        return $fields;
    }
206071
protected function validateDestinationRename()
    {
        if ($this->isError()) {
            return null;
        }

        $files = $this->getSubmitted('files');

        /* @var $file \SplFileInfo */
        $file = reset($files);
        $name = $this->getSubmitted('name');

        $directory = dirname($file->getRealPath());
        $destination = gplcart_path_normalize("$directory/$name");

        if (file_exists($destination)) {
            $this->setError('name', $this->translation->text('Destination already exists'));
            return false;
        }

        $this->setSubmitted('destination', $destination);
        return true;
    }
254218
function title( $contentObjectAttribute, $name = null )
    {
        $timestamp = $contentObjectAttribute->attribute( 'data_int' );
        $locale = eZLocale::instance();

        if ( $timestamp !== null )
        {
            $time = new eZTime( $timestamp );
            return $locale->formatTime( $time->timeStamp() );
        }
        return '';
    }
1374767
protected function _getTitle()
    {
        $templates = Configure::read('Notifier.templates');

        if (array_key_exists($this->_properties['template'], $templates)) {
            $template = $templates[$this->_properties['template']];

            $vars = json_decode($this->_properties['vars'], true);

            return Text::insert($template['title'], $vars);
        }
        return '';
    }
256117
function title( $contentObjectAttribute, $name = null )
    {
        $content = $contentObjectAttribute->content();
        if ( is_array( $content['value'] ) )
        {
            $imploded = '';
            foreach ( $content['value'] as $country )
            {
                $countryName = $country['Name'];
                if ( $imploded == '' )
                    $imploded = $countryName;
                else
                    $imploded .= ',' . $countryName;
            }
            $content['value'] = $imploded;
        }
        return $content['value'];
    }
1327620
public function getTitleField()
    {
        if ($this->title_field && $this->hasElement($this->title_field)) {
            return $this->title_field;
        }

        return $this->id_field;
    }
482650
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();
		$info 	= (object) pathinfo($file['name']);
		$params = array_map(function($value) {

			if(false === is_string($value)) {
				return trigger_error(sprintf('Extension passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
			}

			return ltrim(strtolower($value), '.');
		}, $params);

		if(true === isset($info -> extension) && false === in_array($info -> extension, $params)) {
			return true;
		}

		return false;
	}
936139
public function getDescriptor()
    {
        if (isset($this->descriptorField)) {
            return $this->parseDescriptorField($this->descriptorField);
        }
        $try = ['name', 'title', 'created'];
        foreach ($try as $t) {
            if ($this->hasAttribute($t)) {
                return $this->{$t};
            }
        }

        return false;
    }
1367980
public function getTitle(): string
    {
        $metadata = $this->getMetadata();

        if (isset($metadata['Title'])) {
            return is_array($metadata['Title']) ? $metadata['Title'][0] ?? '' : $metadata['Title'];
        }

        return parent::getTitle();
    }
667055
public function getTitleContentType()
    {
        $title_content_type = 'text/plain';

        if (isset($this->parent->title_content_type)) {
            $title_content_type = $this->parent->title_content_type;
        }

        return $title_content_type;
    }
47447
protected static function detectTitle(array $title)
    {
        $assignment = $title['assignment'];
        if ($assignment === null) {
            return;
        }

        $where = array_merge(
            Utils\Utils::arrayWhitelist($title, [
                'assignment',
                'our_number',
                'due',
            ]),
            [
                'ORDER' => [
                    'stamp' => 'DESC',
                    'id' => 'DESC',
                ],
            ]
        );

        $ids = Models\Title::dump($where, 'id');
        if (empty($ids)) {
            return;
        }
        return $ids[0];
    }
297729
public function performReadonlyTransformation()
    {
        $values = '';
        $data   = [];

        $items = $this->value;
        if ($this->source) {
            foreach ($this->source as $source) {
                if (is_object($source)) {
                    $sourceTitles[$source->ID] = $source->Title;
                }
            }
        }

        if ($items) {
            // Items is a DO Set
            if (is_a($items, 'DataList')) {
                foreach ($items as $item) {
                    $data[] = $item->Title;
                }
                if ($data) $values = implode(', ', $data);

                // Items is an array or single piece of string (including comma seperated string)
            } else {
                if (!is_array($items)) {
                    $items = preg_split('/ *, */', trim($items));
                }

                foreach ($items as $item) {
                    if (is_array($item)) {
                        $data[] = $item['Title'];
                    } elseif (is_array($this->source) && !empty($this->source[$item])) {
                        $data[] = $this->source[$item];
                    } elseif (is_a($this->source, 'DataList')) {
                        $data[] = $sourceTitles[$item];
                    } else {
                        $data[] = $item;
                    }
                }

                $values = implode(', ', $data);
            }
        }

        $title = ($this->title) ? $this->title : '';

        $field = new ReadonlyField($this->name, $title, $values);
        $field->setForm($this->form);

        return $field;
    }