for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/** @formatter:off
* ******************************************************************
* Created by Marko Kungla on Jun 20, 2016 - 8:45:32 PM
* Contact [email protected]
* @copyright 2016 Marko Kungla - https://github.com/mkungla
* @license The MIT License (MIT)
*
* @category AframeVR
* @package aframe-php
* Lang PHP (php version >= 7)
* Encoding UTF-8
* File Aframe.php
* Code format PSR-2 and 12
* @link https://github.com/mkungla/aframe-php
* @issues https://github.com/mkungla/aframe-php/issues
* ********************************************************************
* Contributors:
* @author Marko Kungla <[email protected]>
* Comments:
* @formatter:on */
namespace AframeVR;
use \AframeVR\Core\{
Config,
Scene
};
final class Aframe
{
/**
* A-Frame Scenes
* All scenes will be in this array as Scene objects with index of custom identifier.
* @var array $scenes
*/
private $scenes = array();
* Configuration Object
* @var \AframeVR\Core\Config $configObj
private $configObj;
* A-Frame PHP Constructor
public function __construct()
/* Initialize configuration */
$this->config();
}
* Get Config
* @return \AframeVR\Core\Config
public function config()
return $this->configObj ?? $this->configObj = new Config();
* Scene
* Work with untitled scene or scene by keyword
* @param string $keyword
* @return \AframeVR\Core\Scene
public function scene(string $keyword = 'untitled'): Scene
return $this->scenes[$keyword] ?? $this->scenes[$keyword] = new Scene($keyword, $this->config());