Draws an actor name.

@param ComActorsDomainEntityActor $actor
@param bool                       $linked if TRUE return a linked name otherwise return name
@param array                      $attr   link attributes

@return string
516780
public function name($actor, $linked = true, $attr = array())
    {
        if (is_null($actor) || !isset($actor->id)) {
            $linked = false;
            $name = '<span class="actor-name">'.AnTranslator::_('LIB-AN-UNKNOWN-PERSON').'</span>';
        } else {
            $name = '<span class="actor-name" actorid="'.$actor->id.'">'.$actor->name.'</span>';
            if($actor->verified){
              $name = $name.' <span class="icon icon-ok-sign"></span>';
            }
        }

        if (!$linked || !$actor->authorize('access')) {
            return (string) $name;
        }

        $url = route($actor->getURL());

        if (is_person($actor)) {
            $attr['title'] = '@'.$actor->alias;
        }

        $name = '<a class="actor-name" '.$this->_buildAttribute($attr).' actorid="'.$actor->id.'" href="'.$url.'" >'.$name.'</a>';

        return $name;
    }
674932
protected function writeAttribute($attr_name, $attr_values)
    {
        // write out attribute content
        if (!is_array($attr_values)) {
            $attr_values = array($attr_values);
        }
        foreach ($attr_values as $attr_val) {
            $line = $this->convertAttribute($attr_name, $attr_val).PHP_EOL;
            $this->writeLine($line, 'Net_LDAP2_LDIF error: unable to write attribute '.$attr_name.' of entry '.$this->_entrynum);
        }
    }
736387
protected function initializeProductLinkAttributeInt(array $attr)
    {

        // load link/product link attribute ID
        $linkId = $attr[MemberNames::LINK_ID];
        $productLinkAttributeId = $attr[MemberNames::PRODUCT_LINK_ATTRIBUTE_ID];

        // try to load the product link attribute integer value with the passed product link attribute/link ID
        if ($entity = $this->loadProductLinkAttributeInt($productLinkAttributeId, $linkId)) {
            return $this->mergeEntity($entity, $attr);
        }

        // simply return the attributes
        return $attr;
    }
780757
protected function initializeProductLinkAttributeVarchar(array $attr)
    {

        // load link/product link attribute ID
        $linkId = $attr[MemberNames::LINK_ID];
        $productLinkAttributeId = $attr[MemberNames::PRODUCT_LINK_ATTRIBUTE_ID];

        // try to load the product link attribute varchar value with the passed product link attribute/link ID
        if ($entity = $this->loadProductLinkAttributeVarchar($productLinkAttributeId, $linkId)) {
            return $this->mergeEntity($entity, $attr);
        }

        // simply return the attributes
        return $attr;
    }
8676
public function attr_first($css, $attr)
    {
        $nodes = $this->_document->getQuery()->css($css, $this->_node);
        return $nodes ? $nodes->item(0)->getAttribute($attr) : null;
    }
934274
public function getContentsByAttr($attr, $attr_value) {
        $nodes = $this->_dom_x_path->query("//*[contains(@{$attr}, '{$attr_value}')]");
        
        $contents = [];
        
        foreach ($nodes as $node) {
            array_push($contents, $node->nodeValue);
        }
        
        return $contents;
    }
982830
protected function body( $attr ) {

		$class = isset( $attr['class'] ) && 'body' !== $attr['class'] ? $attr['class'] : '';

		$attr['class'] = join( ' ', get_body_class( $class ) );
		$attr['dir']   = is_rtl() ? 'rtl' : 'ltr';

		return $attr;
	}
1255620
protected static function _buildAttr($attr, $value = '')
    {
        if (\is_string($attr)) {

            if (\is_bool($value)) {
                $value = $value ? 'true' : 'false';
            }

            return "{$attr}=\"{$value}\"";
        }

        if (\is_array($attr)) {
            $attrs = [];

            foreach ($attr as $name => $val) {
                $attrs[] = static::_buildAttr($name, $val);
            }

            return implode(' ', $attrs);
        }

        return '';
    }
1232785
function attribute( $attr )
    {
        switch ( $attr )
        {
            case "original_filename":
                return $this->OriginalFilename;
            case "mime_type":
                return $this->Type;
            case "mime_type_category":
                return $this->MimeCategory;
            case "mime_type_part":
                return $this->MimePart;
            case "filename":
                return $this->Filename;
            case "filesize":
                return $this->Size;
            case "is_temporary":
                return $this->IsTemporary;
            default:
            {
                eZDebug::writeError( "Attribute '$attr' does not exist", __METHOD__ );
                return null;
            } break;
        }
    }
548670
public function style($src, $attr = array())
    {
        $src = $this->Assets->getStyle($src);
        $attr['href'] = $src;

        $attr = array_merge(
            array(
                'media' => 'screen',
                'rel' => 'stylesheet',
                'type' => 'text/css'
            ),
            $attr
        );

        return $this->tag('link', $attr);
    }
518663
function attribute( $attr )
    {
        if ( isset( $this->Attributes[$attr] ) )
        {
            return $this->$attr();
        }
        else if ( $attr == 'wwwdir' )
        {
            return $this->wwwDir();
        }
        else if ( $attr == 'sitedir' )
        {
            return $this->siteDir();
        }
        else if ( $attr == 'indexfile' )
        {
            return $this->indexFile();
        }
        else if ( $attr == 'indexdir' )
        {
            return $this->indexDir();
        }
        else if ( $attr = 'querystring' )
        {
            return $this->queryString();
        }

        eZDebug::writeError( "Attribute '$attr' does not exist", __METHOD__ );
        return null;
    }
1062482
public function get($attr,$current=true)
    {
        if (!$this->_data || !array_key_exists($attr, $this->_data)) {
            return null;
        }
        return Connection::convertToEncoding($current ? $this->_data[$attr] : $this->_prev_data[$attr]);
    }
542583
public function encodeControlAttribution(Attribution $attribution, Encoder $encoder)
    {
        $result = $this->doControlEncode('attribution', $attribution, $encoder);

        foreach ($attribution->getAttributions() as $value) {
            $result .= sprintf(
                '%s.addAttribution(\'%s\');' . "\n",
                $encoder->encodeReference($attribution),
                $value
            );
        }

        return $result;
    }
864080
public function my_addActor($actor)
    {
        $node = $this->searchActor($actor);
        if ($node) return false;
        $this->th_addActor($this->node_name, $actor);
        foreach ($this->client as $client) {
            $client->addNodeActor($this->node_name, $actor);
        }
        return true;
    }
577699
public function linkAction($action, $name, $parameters=array(), $position="BL", $attributes=array())
    {
        return $this->link(action($action, $parameters), $name, $position, $attributes);
    }
1069696
public static function getKeyAlias(array &$attr)
    {
        foreach (TagInfo::$attrKeyAliases as $alias => $key) {
            if (strpos($attr[0], $alias) === 0) {
                return compact('key', 'alias');
            }
        }

        return false;
    }
880626
protected function linkifyHttp($protocol, $text, array &$links, $attr, $mode)
    {
        $regexp = $mode != 'all'
            ? '~(?:(https?)://([^\s<>]+)|(?<!\w@)\b(www\.[^\s<>]+?\.[^\s<>]+))(?<![\.,:;\?!\'"\|])~i'
            : '~(?:(https?)://([^\s<>]+)|(?<!\w@)\b([^\s<>@]+?\.[^\s<>]+)(?<![\.,:]))~i';
        
        return preg_replace_callback($regexp, function ($match) use ($protocol, &$links, $attr) {
            if ($match[1]) $protocol = $match[1];
            $link = $match[2] ?: $match[3];
            
            return '<' . array_push($links, '<a' . $attr . ' href="' . $protocol . '://' . $link . '">'
                . rtrim($link, '/') . '</a>') . '>';
        }, $text);
    }