public function fetchAll()
 {
     $this->buildStart();
     $this->build();
     $this->buildStat();
     $results = array();
     while ($data = $this->stat->fetch()) {
         // TODO should be got from extensions properly!
         if ($data['type'] == 'PINGBACK') {
             $il = new PingBackIncomingLink();
         } else {
             $il = new WebMentionIncomingLink();
         }
         $il->setFromDataBaseRow($data);
         $results[] = $il;
     }
     return $results;
 }
<?php

require 'localConfig.php';
require_once (defined('COMPOSER_ROOT_DIR') ? COMPOSER_ROOT_DIR : APP_ROOT_DIR) . '/vendor/autoload.php';
require_once APP_ROOT_DIR . '/core/php/autoload.php';
require_once APP_ROOT_DIR . '/core/php/autoloadWebApp.php';
/**
 *
 *
 * @package Core
 * @link http://ican.openacalendar.org/ OpenACalendar Open Source Software
 * @license http://ican.openacalendar.org/license.html 3-clause BSD
 * @copyright (c) 2013-2015, JMB Technology Limited, http://jmbtechnology.co.uk/
 * @author James Baster <*****@*****.**>
 */
\incominglinks\WebMentionIncomingLink::receive($app, null);
<?php

require 'localConfig.php';
require_once (defined('COMPOSER_ROOT_DIR') ? COMPOSER_ROOT_DIR : APP_ROOT_DIR) . '/vendor/autoload.php';
require_once APP_ROOT_DIR . '/core/php/autoload.php';
require_once APP_ROOT_DIR . '/core/php/autoloadWebApp.php';
use repositories\SiteRepository;
/**
 *
 *
 * @package Core
 * @link http://ican.openacalendar.org/ OpenACalendar Open Source Software
 * @license http://ican.openacalendar.org/license.html 3-clause BSD
 * @copyright (c) 2013-2015, JMB Technology Limited, http://jmbtechnology.co.uk/
 * @author James Baster <*****@*****.**>
 */
$siteRepository = new SiteRepository();
$site = $siteRepository->loadByDomain($_SERVER['SERVER_NAME']);
if (!$site) {
    die("404 Not Found");
    // TODO
}
if ($site->getIsClosedBySysAdmin()) {
    die("404 Not Found");
    // TODO
}
\incominglinks\WebMentionIncomingLink::receive($app, $site);