author要素を生成します。(ja)
Generate author element.(en)
'name' => 'Mark Pilgrim',
'uri' => 'http://example.org/',
'email' => 'f8dy@example.com'
));
<name>Mark Pilgrim</name>
<uri>http://example.org/</uri>
<email>f8dy@example.com</email>
');
# 出力すると以下のようになります。
# <author>
# <name>Mark Pilgrim</name>
# <uri>http://example.org/</uri>
# <email>f8dy@example.com</email>
# </author>
string
author
([mixed $content = array()], [array $attributes = array()])
-
mixed
$content: author要素の内容。配列または文字列(ja) author element content. array or string(en)
-
array
$attributes: author要素の属性(ja) The attributes of the author element(en)
category要素を生成します。(ja)
Generate category element.(en)
string
category
([array $attributes = array()])
-
array
$attributes: category要素の属性(ja) The attributes of the category element(en)
content要素を生成します。(ja)
Generate content element.(en)
'<p><i>[Update: The Atom draft is finished.]</i></p>',
array('type' => 'xhtml', 'xml:lang' => 'en', 'xml:base' => 'http://diveintomark.org/')
);
# 出力すると以下のようになります。
# <content type="xhtml" xml:lang="en" xml:base="http://diveintomark.org/">
# <div xmlns="http://www.w3.org/1999/xhtml">
# <p><i>[Update: The Atom draft is finished.]</i></p>
# </div>
# </content>
string
content
([string $content = null], [array $attributes = array()])
-
string
$content: content要素の内容(ja) content element content(en)
-
array
$attributes: content要素の属性(ja) The attributes of the content element(en)
contributor要素を生成します。(ja)
Generate contributor element.(en)
'name' => 'Sam Ruby'
));
<name>Sam Ruby</name>
');
# 出力すると以下のようになります。
# <contributor>
# <name>Sam Ruby</name>
# </contributor>
string
contributor
([mixed $content = array()], [array $attributes = array()])
-
mixed
$content: contributor要素の内容(ja) contributor element content(en) 配列または文字列
-
array
$attributes: contributor要素の属性(ja) The attributes of the contributor element(en)
現在のURLを返します。(ja)
Returns the current URL.(en)
string
currentUrl
()
タイムスタンプをAtomの日付形式に変換します。
# 出力すると以下のようになります。
# 2003-12-13T18:30:02+00:00
string
date
([integer $timestamp = null])
-
integer
$timestamp: タイムスタンプ(ja) Timestamp(en)
email要素を生成します。(ja)
Generate email element.(en)
$atom->email('f8dy@example.com');
# 出力すると以下のようになります。
# <email>f8dy@example.com</email>
string
email
(string $content, [array $attributes = array()])
-
string
$content: email要素の内容(ja) email element content(en)
-
array
$attributes: email要素の属性(ja) The attributes of the email element(en)
終了タグを生成します。(ja)
Generate end tag.(en)
# 出力すると以下のようになります。
# </entry>
#
# </feed>
string
endTag
(string $name)
-
string
$name: 要素の名前(ja) The name of the end tag(en)
entry要素を生成します。(ja)
Generate entry element.(en)
$atom->entry('<title>Example</title>...');
// atom::setEntryで溜めたものを吐き出します。
string
entry
([string $content = null], [array $attributes = array()])
-
string
$content: entry要素の内容(ja) entry element content(en)
-
array
$attributes: entry要素の属性(ja) The attributes of the entry element(en)
feed要素を生成します。(ja)
Generate feed element.(en)
$atom->feed('<title>Example</title>...');
// atom::setFeedで溜めたものを吐き出します。
string
feed
([string $content = null], [array $attributes = array()])
-
string
$content: feed要素の内容(ja) feed element content(en)
-
array
$attributes: feed要素の属性(ja) The attributes of the feed element(en)
generator要素を生成します。(ja)
Generate generator element.(en)
$atom->generator('Example Toolkit', array('uri' =>
'http://www.example.com/', 'version' =>
'1.0'));
# 出力すると以下のようになります。
# <generator uri="http://www.example.com/" version="1.0">Example Toolkit</generator>
string
generator
(string $content, [array $attributes = array()])
-
string
$content: generator要素の内容(ja) generator element content(en)
-
array
$attributes: generator要素の属性(ja) The attributes of the generator element(en)
このヘルパー内に溜められているentry要素以下を吐き出します。
string
getEntry
([boolean $clean = true])
-
boolean
$clean: 溜められているものを削除するか
このヘルパー内に溜められているfeed要素以下を吐き出します。
string
getFeed
([boolean $clean = true])
-
boolean
$clean: 溜められているものを削除するか
icon要素を生成します。(ja)
Generate icon element.(en)
$atom->icon('/favicon.ico');
# 出力すると以下のようになります。
# <icon>http://example.com/favicon.ico</icon>
string
icon
(mixed $url, [array $attributes = array()])
-
mixed
$url: アイコンへのURL(ja) Icon URL(en)
-
array
$attributes: icon要素の属性(ja) The attributes of the icon element(en)
id要素を生成します。(ja)
Generate id element.(en)
$atom->id('tag:example.org,2003:3', array('#urn' =>
true));
# 出力すると以下のようになります。
# <id>tag:example.org,2003:3</id>
string
id
([mixed $id = array()], [array $attributes = array()])
-
mixed
$id: 識別子(ja) Identifier(en)
-
array
$attributes: id要素の属性(ja) The attributes of the id element(en)
link要素を生成します。(ja)
Generate link element.(en)
$atom->link(array('controller' =>
'posts', 'action' =>
'index'));
$atom->link(null, array('rel' =>
'self'));
'http://example.org/audio/ph34r_my_podcast.mp3',
array('rel' => 'enclosure', 'type' => 'audio/mpeg', 'length' => 1337)
);
# 出力すると以下のようになります。
# <link rel="alternate" href="http://example.com/posts" />
#
# <link rel="self" href="http://example.com/" />
#
# <link rel="enclosure" type="audio/mpeg" length="1337" href="http://example.org/audio/ph34r_my_podcast.mp3" />
string
link
([mixed $url = null], [array $attributes = array()])
-
mixed
$url: URL リンク先へのURL
-
array
$attributes: link要素の属性(ja) The attributes of the link element(en)
logo要素を生成します。(ja)
Generate logo element.(en)
$atom->logo('/img/logo.png');
# 出力すると以下のようになります。
# <logo>http://example.com/img/logo.png</logo>
string
logo
(mixed $url, [array $attributes = array()])
-
mixed
$url: ロゴのURL(ja) Logo URL(en)
-
array
$attributes: logo要素の属性(ja) The attributes of the logo element(en)
name要素を生成します。(ja)
Generate name element.(en)
$atom->name('Mark Pilgrim');
# 出力すると以下のようになります。
# <name>Mark Pilgrim</name>
string
name
(string $content, [array $attributes = array()])
-
string
$content: name要素の内容(ja) name element content(en)
-
array
$attributes: name要素の属性(ja) The attributes of the name element(en)
atomPersonConstructとして処理し任意の要素を生成します。(ja)
'name' => 'Sam Ruby'
));
# 出力すると以下のようになります。
# <author>
# <name>Sam Ruby</name>
# </author>
string
personConstruct
(mixed $name, [mixed $content = array()], [array $attributes = array()])
-
mixed
$name: 要素の名前(ja) The name of the element(en)
-
mixed
$content: 要素の内容 配列または文字列(ja) element content. array or string(en)
-
array
$attributes: 要素の属性(ja) The attributes of the element(en)
published要素を生成します。(ja)
Generate published element.(en)
$atom->published('2003-12-13T08:29:29-04:00');
# 出力すると以下のようになります。
# <published>2003-12-13T08:29:29-04:00</published>
string
published
([mixed $timestamp = null], [array $attributes = array()])
-
mixed
$timestamp: published要素の内容。タイムスタンプまたはAtomの日付形式(ja) published element content. timestamp or Atom date format(en)
-
array
$attributes: published要素の属性(ja) The attributes of the published element(en)
rights要素を生成します。(ja)
Generate rights element.(en)
$atom->rights('Copyright (c) 2003, Mark Pilgrim');
# 出力すると以下のようになります。
# <rights type="text">Copyright (c) 2003, Mark Pilgrim</rights>
string
rights
(string $content, [array $attributes = array()])
-
string
$content: rights要素の内容(ja) rights element content(en)
-
array
$attributes: rights要素の属性(ja) The attributes of the rights element(en)
多次元配列をXMLに変形します。(ja)
The multidimensional array is transformed into XML.(en)
array('header'),
array('stylesheet', '/xsl/atom.xsl', array('charset' => 'UTF-8', 'type' => 'text/xsl')),
array('feed', array(
array('title', 'dive into mark'),
array('subtitle', 'A <em>lot</em> of effort went into making this effortless', array('type' => 'html')),
array('updated', '2003-12-13T18:30:02Z'),
array('id', 'tag:example.org,2003:3', array('#urn' => true)),
array('link', '/', array('type' => 'text/html')),
array('link', null, array('rel' => 'self', 'type' => 'application/atom+xml')),
array('rights', 'Copyright (c) 2003, Mark Pilgrim'),
array('generator', 'Example Toolkit', array('uri' => 'http://www.example.com/', 'version' => '1.0')),
array('dc:description', 'A lot of effort went into making this effortless'),
'<dc:format>application/atom+xml</dc:format>',
'<dc:date>2003-12-13T18:30:02Z</dc:date>',
array('entry', array(
array('title', 'Atom draft-07 snapshot'),
array('link', 'http://example.org/2003/12/13/atom03', array('type' => 'text/html')),
array('link', 'http://example.org/audio/ph34r_my_podcast.mp3', array('rel' => 'enclosure', 'type' => 'audio/mpeg', 'length' => '1337')),
array('id', 'tag:example.org,2003:3.2397', array('#urn' => true)),
array('updated', '2005-07-31T12:29:29Z'),
array('published', 1071318569),
array('author', array('name' => 'John Doe', 'uri' => 'http://example.org/', 'email' => 'f8dy@example.com')),
array('contributor', array('name' => 'Sam Ruby')),
array('contributor', array('name' => 'Joe Gregorio')),
array('content', '<p><i>[Update: The Atom draft is finished.]</i></p>', array('type' => 'xhtml', 'xml:lang' => 'en', 'xml:base' => 'http://diveintomark.org/'))
))
),
array('xmlns:dc' => 'http://purl.org/dc/elements/1.1/')
)
));
# 出力すると以下のようになります。
# <?xml version="1.0" encoding="UTF-8" ?>
# <?xml-stylesheet charset="UTF-8" type="text/xsl" href="http://example.com/xsl/atom.xsl" ?>
# <feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xml:base="http://example.com/atom">
# <title type="text">dive into mark</title>
# <subtitle type="html">A <em>lot</em> of effort went into making this effortless</subtitle>
# <updated>2003-12-13T18:30:02Z</updated>
# <id>tag:example.org,2003:3</id>
# <link type="text/html" rel="alternate" href="http://example.com/" />
# <link rel="self" type="application/atom+xml" href="http://example.com/atom" />
# <rights type="text">Copyright (c) 2003, Mark Pilgrim</rights>
# <generator uri="http://www.example.com/" version="1.0">Example Toolkit</generator>
# <dc:description>A lot of effort went into making this effortless</dc:description>
# <dc:format>application/atom+xml</dc:format>
# <dc:date>2003-12-13T18:30:02Z</dc:date>
# <entry>
# <title type="text">Atom draft-07 snapshot</title>
# <link type="text/html" rel="alternate" href="http://example.org/2003/12/13/atom03" />
# <link rel="enclosure" type="audio/mpeg" length="1337" href="http://example.org/audio/ph34r_my_podcast.mp3" />
# <id>tag:example.org,2003:3.2397</id>
# <updated>2005-07-31T12:29:29Z</updated>
# <published>2003-12-13T12:29:29+00:00</published>
# <author>
# <name>John Doe</name>
# <uri>http://example.org/</uri>
# <email>f8dy@example.com</email>
# </author>
# <contributor>
# <name>Sam Ruby</name>
# </contributor>
# <contributor>
# <name>Joe Gregorio</name>
# </contributor>
# <content type="xhtml" xml:lang="en" xml:base="http://diveintomark.org/">
# <div xmlns="http://www.w3.org/1999/xhtml">
# <p><i>[Update: The Atom draft is finished.]</i></p>
# </div>
# </content>
# </entry>
# </feed>
string
serialize
(array $data)
-
array
$data: 多次元配列(ja) Multidimensional array(en)
ヘルパー内にentry要素以下の要素を溜めます。
$atom->setEntry('title', 'Example Page');
$atom->setEntry('link', array('controller' =>
'posts', 'action' =>
'index'));
//以下のような書き方も可能です。
$atom->setEntryTitle('Example Page');
$atom->setEntryLink(array('controller' => 'posts', 'action' => 'index'));
void
setEntry
()
ヘルパー内にfeed要素以下の要素を溜めます。
$atom->setFeed('title', 'Example Feed');
$atom->setFeed('link', array('controller' =>
'posts', 'action' =>
'index'));
//以下のような書き方も可能です。
$atom->setFeedTitle('Example Feed');
$atom->setFeedLink(array('controller' => 'posts', 'action' => 'index'));
void
setFeed
()
開始タグを生成します。(ja)
Generate start tag.(en)
# 出力すると以下のようになります。
# <feed>
#
# <entry>
string
startTag
(string $name, [array $attributes = array()])
-
string
$name: 要素の名前(ja) The name of the start tag(en)
-
array
$attributes: 開始タグの属性(ja) The attributes of the start tag(en)
xml-stylesheetを生成します。(ja)
Generate xml-stylesheet.(en)
$atom->stylesheet('/xsl/atom.xsl', array('charset' =>
'UTF-8', 'type' =>
'text/xsl'));
# 出力すると以下のようになります。
# <?xml-stylesheet charset="UTF-8" type="text/xsl" href="http://example.com/xsl/atom.xsl" ?>
string
stylesheet
([string $url = null], [array $attributes = array()])
-
string
$url: スタイルシートへのURL(ja) Stylesheet URL(en)
-
array
$attributes: xml-stylesheetの属性(ja) The attributes of the xml-stylesheet(en)
subtitle要素を生成します。(ja)
Generate subtitle element.(en)
$atom->subtitle('A <em>lot</em> of effort', array('type' =>
'html'));]
# 出力すると以下のようになります。
# <subtitle type="html">A <em>lot</em> of effort</subtitle>
string
subtitle
(string $content, [array $attributes = array()])
-
string
$content: subtitle要素の内容(ja) subtitle element content(en)
-
array
$attributes: subtitle要素の属性(ja) The attributes of the subtitle element(en)
summary要素を生成します。(ja)
Generate summary element.(en)
# 出力すると以下のようになります。
# <summary type="text">Some text.</summary>
string
summary
(string $content, [array $attributes = array()])
-
string
$content: summary要素の内容(ja) summary element content(en)
-
array
$attributes: summary要素の属性(ja) The attributes of the summary element(en)
XMLの要素を生成します。(ja)
Generate XML element.(en)
$atom->tag('dc:description', 'Example Page', array('xmlns:dc' =>
'http://purl.org/dc/elements/1.1/'));
//以下のようにも記述できます。
$atom->description('Example Page', array('xmlns:dc' => 'http://purl.org/dc/elements/1.1/'), 'dc');
# 出力すると以下のようになります。
# <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Example Page</dc:description>
string
tag
([string $name = null], [string $content = null], [array $attributes = array()], [string $namespace = false])
-
string
$name: 要素の名前(ja) The name of the XML element(en)
-
string
$content: 要素の内容(ja) The attributes of the XML element(en)
-
array
$attributes: 要素の属性(ja) XML element content(en)
-
string
$namespace: 要素の名前空間(ja) The namespace of the XML element(en)
atomTextConstructとして処理し任意の要素を生成します
'subtitle',
'A <em>lot</em> of effort went into making this effortless',
array('type' => 'html')
);
# 出力すると以下のようになります。
# <subtitle type="html">A <em>lot</em> of effort went into making this effortless</subtitle>
string
textConstruct
(string $name, string $content, [array $attributes = array()])
-
string
$name: 要素の名前(ja) The name of the element(en)
-
string
$content: 要素の内容(ja) element content(en)
-
array
$attributes: 要素の属性(ja) The attributes of the element(en)
title要素を生成します。(ja)
Generate title element.(en)
$atom->title('Example Feed');
# 出力すると以下のようになります。
# <title type="text">Example Feed</title>
string
title
(string $content, [array $attributes = array()])
-
string
$content: title要素の内容(ja) title element content(en)
-
array
$attributes: title要素の属性(ja) The attributes of the title element(en)
updated要素を生成します。(ja)
Generate updated element.(en)
$atom->updated('2003-12-13T18:30:02Z');
# 出力すると以下のようになります。
# <updated>2003-12-13T18:30:02Z</updated>
string
updated
([mixed $timestamp = null], [array $attributes = array()])
-
mixed
$timestamp: updated要素の内容。タイムスタンプまたはAtomの日付形式(ja) updated element content. timestamp or Atom date format(en)
-
array
$attributes: updated要素の属性(ja) The attributes of the updated element(en)
uri要素を生成します。(ja)
Generate uri element.(en)
$atom->uri('http://example.org/');
# 出力すると以下のようになります。
# <uri>http://example.org/</uri>
string
uri
(mixed $url, [array $attributes = array()])
-
mixed
$url: uri要素の内容(ja) uri element content(en)
-
array
$attributes: uri要素の属性(ja) The attributes of the uri element(en)
Finds URL for specified action.
Returns a URL pointing at the provided parameters.
string
url
([mixed $url = null], [boolean $full = false])
-
mixed
$url: Either a relative string url like `/products/view/23` or an array of url parameters. Using an array for urls will allow you to leverage the reverse routing features of CakePHP.
-
boolean
$full: If true, the full base URL will be prepended to the result
配列の属性を文字列化します。
string
_attributes
([ $attributes = array()], array $attribute)
-
array
$attribute: 属性(ja) attributes(en)
-
$attributes
void
__call
( $name, $arguments)