Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #72 from apility/develop
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
thomas-alrek authored Aug 8, 2019
2 parents 627966e + 7e127ec commit b3e5483
Show file tree
Hide file tree
Showing 65 changed files with 1,368 additions and 679 deletions.
5 changes: 5 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@
tests/TestSuites/Editor
</directory>
</testsuite>
<testsuite name="ElasticSearch Tests">
<directory suffix=".test.php">
tests/TestSuites/ElasticSearch
</directory>
</testsuite>
</testsuites>
</phpunit>
53 changes: 25 additions & 28 deletions src/NF.php
Original file line number Diff line number Diff line change
@@ -1,53 +1,63 @@
<?php

use Netflex\Site\JWT;
use GuzzleHttp\Client;
use Netflex\Site\Cache;
use Netflex\Site\Site;
use Netflex\Site\Util;
use Netflex\Site\Cache;
use Netflex\Site\Store;
use Netflex\Site\Console;
use Netflex\Site\Security;
use Netflex\Site\Util;
use Netflex\Site\Commerce;
use Netflex\Site\Search;
use Netflex\Site\JWT;
use Netflex\Site\Console;
use Netflex\Site\ElasticSearch;

class NF
{
/** @var JWT */
public static $jwt;

/** @var string */
public static $path;

/** @var Site */
public static $site;

/** @var Client */
public static $capi;

/** @var Util */
public static $util;

/** @var Store */
public static $store;

/** @var Cache */
public static $cache;
/** @var Search */

/** @var ElasticSearch */
public static $search;

/** @var string */
public static $branch;

/** @var array[string]string */
public static $config;

/** @var array[string]string */
public static $routes;
/**
* @deprecated 1.0.11
* @var Console
* */
public static $console;

/** @var string */
public static $sitename;

/** @var Security */
public static $security;

/** @var Commerce */
public static $commerce;

/** @var string */
public static $cacheDir;

/** @var string */
public static $site_root;

Expand Down Expand Up @@ -86,7 +96,6 @@ public static function init($site = null, $branch = null, $path = [])
self::clearCache();
}

self::$console = Console::getInstance();
self::$site = new Site();

// Datastore for Netflex
Expand All @@ -102,7 +111,7 @@ public static function init($site = null, $branch = null, $path = [])
self::$util = new Util();
self::$commerce = new Commerce();

self::$search = new Search();
self::$search = new ElasticSearch();
}

/**
Expand Down Expand Up @@ -165,18 +174,6 @@ public static function nfPath($file)
return __DIR__ . '/' . $file;
}

/**
* Instantiates a PHPConsole session
*
* @deprecated 1.0.11
* @return Console
*/
public static function startPhpConsole()
{
trigger_error('NF::startPhpConsole is deprecated', E_USER_DEPRECATED);
return new Console();
}

/**
* Write a debug message to the PhpConsole
*
Expand All @@ -185,8 +182,8 @@ public static function startPhpConsole()
*/
public static function debug($text, $label = null)
{
$console = Console::getInstance();
$console->log($text, $label);
Console::getInstance()
->log($text, $label);
}

/**
Expand All @@ -206,7 +203,7 @@ private static function initGuzzle($config)
/**
* Returns a Search instance
*
* @return Search
* @return ElasticSearch
*/
public static function search()
{
Expand Down
13 changes: 0 additions & 13 deletions src/Netflex/Site/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,4 @@ public function log ($text, $labels = null) {
$this->handler->debug($text, $labels);
}
}

/**
* @deprecated 1.0.11
*
* @param string $text
* @param string $label
* @return void
*/
public function debug ($text, $label)
{
trigger_error('NF::$console->debug is deprecated', E_USER_DEPRECATED);
return $this->log($text, $label);
}
}
Loading

0 comments on commit b3e5483

Please sign in to comment.