创建图文消息
@param array $title 标题
@param array $summary 摘要
@param array $content 内容
@param array $photoid 素材库里的图片id(可通过uploadFile上传后获取)
@param array $srcurl 原文链接
@return json
549122
public function addPreview($title,$author,$summary,$content,$photoid,$srcurl='') {
		$send_snoopy = new Snoopy;
		$send_snoopy->referer = 'https://mp.weixin.qq.com/cgi-bin/operate_appmsg?lang=zh_CN&sub=edit&t=wxm-appmsgs-edit-new&type=10&subtype=3&token='.$this->_token;
		
		$submit = "https://mp.weixin.qq.com/cgi-bin/operate_appmsg?lang=zh_CN&t=ajax-response&sub=create&token=".$this->_token;
		$send_snoopy->rawheaders['Cookie']= $this->cookie;
		
		$send_snoopy->set_submit_normal();
		$post = array(
				'token'=>$this->_token,
				'type'=>10,
				'lang'=>'zh_CN',
				'sub'=>'create',
				'ajax'=>1,
				'AppMsgId'=>'',				
				'error'=>'false',
		);
		if (count($title)==count($author)&&count($title)==count($summary)&&count($title)==count($content)&&count($title)==count($photoid))
		{
			$i = 0;
			foreach($title as $v) {
				$post['title'.$i] = $title[$i];
				$post['author'.$i] = $author[$i];
				$post['digest'.$i] = $summary[$i];
				$post['content'.$i] = $content[$i];
				$post['fileid'.$i] = $photoid[$i];
				if ($srcurl[$i]) $post['sourceurl'.$i] = $srcurl[$i];
				
				$i++;
				}
		}
		$post['count'] = $i;
		$post['token'] = $this->_token;
		$send_snoopy->submit($submit,$post);
		$tmp = $send_snoopy->results;
		$this->log('step2:'.$tmp);
		$json = json_decode($tmp,true);
		return $json;
	}
742088
public function addImage($title, $description, $path, $width, $coordinate){
        $objDrawing = new PHPExcel_Worksheet_Drawing();
        $objDrawing->setName($title);
        $objDrawing->setDescription($description);
        $objDrawing->setPath($path);
        $objDrawing->setHeight($width);
        $objDrawing->setCoordinates($coordinate);
        $objDrawing->setWorksheet($this->engine->getActiveSheet());
    }
559120
function title( $contentObjectAttribute, $name = null )
    {
        $categoryID = $contentObjectAttribute->attribute( "data_int" );
        $category = $categoryID > 0 ? eZProductCategory::fetch( $categoryID ) : false;
        return is_object( $category ) ? $category->attribute( 'name' ) : '';
    }
599125
public static function link($url, $title = null, $attributes = array(), $secure = null)
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }
652604
public function sendImageByGroup($group_id, $media_id, $title = "", $description = "")
    {
        $ret = array();
        $ret['filter']['group_id'] = $group_id;
        if (! empty($this->is_to_all)) {
            $ret['filter']['is_to_all'] = $this->is_to_all;
        }
        $ret['msgtype'] = 'image';
        $ret['image']['media_id'] = $media_id;
        $ret['image']['title'] = $title;
        $ret['image']['description'] = $description;
        return $this->sendAll($ret);
    }
880826
public function sendTextByGroup($group_id, $content, $title = "", $description = "")
    {
        $ret = array();
        $ret['filter']['group_id'] = $group_id;
        if (! empty($this->is_to_all)) {
            $ret['filter']['is_to_all'] = $this->is_to_all;
        }
        $ret['msgtype'] = 'text';
        $ret['text']['content'] = $content;
        $ret['text']['title'] = $title;
        $ret['text']['description'] = $description;
        return $this->sendAll($ret);
    }
198732
public static function dialog($content, $title = '', $width = 'auto', $height = 'auto', $ajax = true) {
		if (is_array($content)) {
			$args          = $content;
			$args['title'] = $title;
			$args['area']  = $width . ',' . $height;
			$args['type']  = $ajax ? 'ajax' : 2;
		} else {
			$args = [
				'title'   => $title,
				'area'    => $width . ',' . $height,
				'type'    => $ajax ? 'ajax' : 2,
				'content' => $content
			];
		}

		return new JsonView(['code' => self::SUCCESS, 'args' => $args, 'action' => self::ACT_DIALOG], ['ajax' => '1']);
	}
145603
public function wp_title($title, $sep, $location){
        if( !empty($this->title) ){
            $array = [$this->title];
            $sep = ' '.trim($sep).' ';
            if( 'right' == $location ){
                $array[] = $sep;
            }else{
                array_unshift($array, $sep);
            }
            $title = implode('', $array);
        }
        return $title;
    }
480220
public function twitter($title, $site, $description, $image = null, $card = 'summary')
    {
        $this->meta('twitter:card', $card);
        $this->meta('twitter:site', $site);
        $this->meta('twitter:title', $title);
        $this->meta('twitter:description', $description);
        $this->meta('twitter:card', $title);

        if (!is_null($image)) {
            $this->meta('twitter:image', $image);
        }
    }
473356
public static function createOrAppendsToTitle($title, $append) {
		
		$oWikiPage = new WikiPage ( $title );
		if ($oWikiPage->exists ()) {
			$Revision = Revision::newFromTitle ( $title );
			$WikiPageContent = $Revision->getContent ( Revision::RAW )->serialize (); // or: $WikiMarkup = WikiPage::getContent(...)->serialize();
			$oContent = ContentHandler::makeContent ( $WikiPageContent . "\n$append", $title );
			
			$Result = $oWikiPage->doEditContent ( $oContent, "auto-inserted by runStatistics", EDIT_UPDATE );
			if ($Result->ok) {
				return;
			} 
			throw new \Exception("Error saving: ".$title->getPrefixedText());
		} else {
			$oContent = ContentHandler::makeContent ( $append, $title );
			$Result = $oWikiPage->doEditContent ( $oContent, "auto-inserted by runStatistics", EDIT_NEW );
			if ($Result->ok) {
				return;
			} 
			throw new \Exception("Error saving: ".$title->getPrefixedText());
		}
	}
680726
public function writeTitle($title, $color = null)
    {
        $this->writeLine("---------------------------\n", $color);
        $this->writeLine($title . "\n", $color);
        $this->writeLine("---------------------------\n", $color);
    }
1036872
public function renderInfo($title, $subtitle, $description = null)
    {
        $output = wordwrap(strtoupper($title), self::config()->columns) . "\n";
        $output .= wordwrap($subtitle, self::config()->columns) . "\n";
        $output .= str_repeat('-', min(self::config()->columns, max(strlen($title), strlen($subtitle)))) . "\n";
        $output .= wordwrap($description, self::config()->columns) . "\n\n";

        return $output;
    }
393018
public function sendSingleActionCardMsg($title, $content, $hideAvatar = 0, $btnOrientation = 0, array $btns=[])
    {
        $query = [
            'msgtype' => 'actionCard',
            'actionCard' => [
                'title' => $title,
                'text' => $content,
                'hideAvatar' => $hideAvatar,
                'btnOrientation' => $btnOrientation,
                'btns' => $btns
            ],
        ];
        return $this->sendMsg($query);
    }
819742
public function create($imageUrl, $boardId, $description = '', $link = '', $title = '', $sectionId = null)
    {
        // Upload image if first argument is a local file
        if (file_exists($imageUrl)) {
            $imageUrl = $this->upload($imageUrl);
        }

        $requestOptions = [
            'method' => 'scraped',
            'description' => $description,
            'link' => $link,
            'image_url' => $imageUrl,
            'board_id' => $boardId,
            'title' => $title,
        ];

        if ($sectionId !== null) {
            $requestOptions['section'] = $sectionId;
        }

        $this->post(UrlBuilder::RESOURCE_CREATE_PIN, $requestOptions);

        return $this->response->getResponseData();
    }
914005
public function generateLinkFor($key, $content, $title = null)
    {
        $direction = $linkDirection = 'asc';

        if ($key === $this->getCurrentKey())
        {
            $direction = ($this->getCurrentDirection() === 'asc') ? 'desc' : 'asc';
            $linkDirection = ($this->getCurrentDirection() === 'desc') ? 'desc' : 'asc';
        }

        $params = array_merge(
            $this->getQueryParams(),
            [
                's' => $key,
                'd' => $direction
            ]
        );

        $url = qs_url(
            $this->getCurrentRequestPath(),
            $params
        );

        return sprintf(
            '<a title="%s" class="%s %s %s" href="%s">%s</a>',
            $title,
            static::linkClass,
            static::linkPrefix . $linkDirection,
            ($key === $this->getCurrentKey()) ? static::linkPrefix . 'active' : '',
            $url,
            $content
        );
    }
830349
public function sendTextByOpenid(array $toUsers, $content, $title = "", $description = "")
    {
        $ret = array();
        $ret['touser'] = $toUsers;
        $ret['msgtype'] = 'text';
        $ret['text']['content'] = $content;
        $ret['text']['title'] = $title;
        $ret['text']['description'] = $description;
        return $this->send($ret);
    }
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 '';
    }