当前位置: 首页>>代码示例>>PHP>>正文


PHP Content::getContent方法代码示例

本文整理汇总了PHP中Content::getContent方法的典型用法代码示例。如果您正苦于以下问题:PHP Content::getContent方法的具体用法?PHP Content::getContent怎么用?PHP Content::getContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Content的用法示例。


在下文中一共展示了Content::getContent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pageAction

 /** Setup an individual page
  * @access public
  * @return void
  */
 public function pageAction()
 {
     if ($this->getParam('slug', 0)) {
         $this->view->contents = $this->_content->getContent('medievalcoins', (string) $this->getParam('slug'));
     } else {
         throw new Pas_Exception_Param($this->_missingParameter, 500);
     }
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:12,代码来源:ArticlesController.php

示例2: indexAction

 public function indexAction()
 {
     $content = new Content();
     $slug = $this->_getParam('slug');
     if ($slug == '\\d+') {
         $content = new Content();
         $this->view->contents = $content->getFrontContent('treports');
         $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
         $client = Zend_Gdata_ClientLogin::getHttpClient($this->_config->webservice->google->username, $this->_config->webservice->google->password, $service);
         $docs = new Zend_Gdata_Docs($client);
         $docsQuery = new Zend_Gdata_Docs_Query();
         $docsQuery->setQuery('title:Treasure Annual Report');
         $feed = $docs->getDocumentListFeed($docsQuery);
         $documents = array();
         foreach ($feed->entries as $entry) {
             $title = $entry->title;
             foreach ($entry->link as $link) {
                 if ($link->getRel() === 'alternate') {
                     $altlink = $link->getHref();
                 }
             }
             $documents[] = array('title' => $title, 'altlink' => $altlink, 'updated' => $entry->updated, 'type' => $entry->content->type, 'published' => $entry->published);
         }
         $this->view->documents = $documents;
     } else {
         $this->view->contents = $content->getContent('treports', $this->_getParam('slug'));
     }
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:28,代码来源:ReportsController.php

示例3: indexAction

 /** Render the index pages
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $content = new Content();
     if (!in_array($this->getParam('slug'), array('gold', 'other'))) {
         $this->view->content = $content->getContent('bronzeage', $this->getParam('slug'));
     } else {
         if ($this->getParam('slug') == 'gold') {
             $this->view->content = $content->getContent('bronzeage', $this->getParam('slug'));
             $this->view->menu = 'gold';
         } else {
             if ($this->getParam('slug') == 'other') {
                 $this->view->content = $content->getContent('bronzeage', $this->getParam('slug'));
                 $this->view->menu = 'other';
             }
         }
     }
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:21,代码来源:ObjectsController.php

示例4: indexAction

 /** The default action - show the home page
  */
 public function indexAction()
 {
     if ($this->_getParam('slug', 0)) {
         $content = new Content();
         $this->view->content = $content->getContent('frg', $this->_getParam('slug'));
     } else {
         throw new Pas_ParamException($this->_missingParameter);
     }
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:11,代码来源:TorecordingController.php

示例5: indexAction

 /** Set up each page
  * @access public
  * @return void
  * @throws Pas_Exception_Param
  */
 public function indexAction()
 {
     if ($this->getParam('slug', false)) {
         $content = new Content();
         $this->view->contents = $content->getContent('conservation', $this->getParam('slug'));
     } else {
         throw new Pas_Exception_Param('That page is not found.', 404);
     }
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:14,代码来源:AdviceController.php

示例6: pageAction

 /** Setup an individual page
  */
 public function pageAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('medievalcoins', (string) $this->_getParam('slug'));
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:7,代码来源:ArticlesController.php

示例7: indexAction

 /** Display the list of topics or individual pages.
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('info', $this->_getParam('slug'));
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:7,代码来源:AdviceController.php

示例8: indexAction

 /**  Render the index page
  */
 function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('treasure', $this->getRequest()->getParam('slug'));
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:7,代码来源:AdviceController.php

示例9: pageAction

 /** Set up individual page
  */
 public function pageAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('romancoins', $this->_getParam('slug'));
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:7,代码来源:ArticlesController.php

示例10: Content

<?php

include_once "../includes/webservice.inc.php";
$webService = new Webservices_Writer();
$webService->init();
$contentObj = new Content();
$result = $contentObj->getContent();
if (count($result) > 0) {
    $webService->createXMLInstance();
    $webService->appendArrayToRootNode('', $result);
    $webService->displayXML();
} else {
    $xmls = $webService->errorXML(join(",", $contentObj->errorMessages));
    $webService->outputXML($xmls);
}
开发者ID:rapsody,项目名称:HeartwebApp,代码行数:15,代码来源:content.php

示例11: indexAction

 /** The index action
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('research', 'advice-for-researchers');
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:9,代码来源:AdviceController.php

示例12: function

require 'vendor/autoload.php';
include 'tempM/databaseAccess.php';
include 'models/content.php';
include 'models/mmscontent.php';
$app = new \Slim\Slim(array('mode' => 'development'));
require 'routes/crawl.php';
$app->get('/hello/:name', function ($name) {
    echo "Hello " . $name;
});
$app->get('/', function () use($app) {
    echo 'You have reached the API home route for Linkubi MMS App';
});
$app->get('/content', function () {
    $content = new Content();
    $result = $content->getContent();
    header("Content-Type: application/json");
    echo json_encode($result);
});
$app->get('/content/:id', function ($id) {
    $content = new Content();
    $result = $content->getContentById($id);
    header("Content-Type: application/json");
    echo json_encode($result);
});
$app->get('/mms_content/:id', function ($id) {
    $content = new MmsContent();
    $result = $content->getMmsContentById($id);
    header("Content-Type: application/json");
    echo json_encode($result);
});
开发者ID:troycaeser,项目名称:WheresMyWallet,代码行数:30,代码来源:index.php

示例13: indexAction

 /** Display list of RSS feeds.
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('datalabs', 'rss');
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:7,代码来源:RssController.php

示例14: treasureAction

 /** Render treasure report pages
  * @access public
  * @return void
  */
 public function treasureAction()
 {
     //Magic in view
     $content = new Content();
     $this->view->contents = $content->getContent('treports', $this->getParam('slug'));
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:10,代码来源:ReportsController.php

示例15: setContent

    function setContent($content_body)
    {
        $this->content_body = htmlentities("{$content_body}");
    }
    function getContent()
    {
        return $this->content_body;
    }
}
/* Test Id */
$content = new Content();
$content->setID();
$content->setID();
$content->setID();
$content->setID();
$content->setID();
$content->setID() . '<br/>';
$content->setAuthor('Guillermina', 'Gonjon') . '<br/>';
$content->setTitle("this is my title") . '<br/>';
$content->setContent("This is an example of what this page can do.  This is my content for this page.");
echo $content->getAuthor() . '<br/>';
echo $content->getDate() . '<br/>';
echo $content->getTitle() . '<br/>';
echo $content->getContent() . '<br/>';
$theid = $content->content_id;
echo $content->formatID($theid) . '<br/>';
var_dump($content);
//echo $content->formatted_id.'<br/>';
$output = shell_exec('cal 2016 | grep 2016') . '<br/>';
//echo "<pre>$output</pre>";
//echo "<br>".phpversion().'<br/>';
开发者ID:gmanon,项目名称:contributions,代码行数:31,代码来源:Content.class.php


注:本文中的Content::getContent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。