-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#16: composer install of pages, and basic first page
- Loading branch information
Showing
1,157 changed files
with
342,673 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
Sites/pages/administrator/cache/koowa.templates/template_1666854407.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
/** | ||
* Joomlatools Framework - https://www.joomlatools.com/developer/framework/ | ||
* | ||
* @copyright Copyright (C) 2007 Johan Janssens and Timble CVBA. (http://www.timble.net) | ||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | ||
* @link https://github.com/joomlatools/joomlatools-framework for the canonical source repository | ||
*/ | ||
|
||
defined('KOOWA') or die; ?> | ||
|
||
<ktml:content> |
2 changes: 2 additions & 0 deletions
2
Sites/pages/administrator/cache/koowa.templates/template_566357700.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h3>Hello World!</h3> | ||
<p>Welcome to my new page.</p> |
6 changes: 6 additions & 0 deletions
6
Sites/pages/administrator/components/com_pages/language/en-GB/en-GB.com_pages.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
; Copyright (C) 2018 Timble CVBA. (http://www.timble.net) | ||
; GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | ||
; Note : All ini files need to be saved as UTF-8 | ||
|
||
COM_PAGES="Pages" | ||
COM_PAGES_XML_DESCRIPTION="" |
6 changes: 6 additions & 0 deletions
6
Sites/pages/administrator/components/com_pages/language/en-GB/en-GB.com_pages.sys.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
; Copyright (C) 2018 Timble CVBA. (http://www.timble.net) | ||
; GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | ||
; Note : All ini files need to be saved as UTF-8 | ||
|
||
COM_PAGES="Pages" | ||
COM_PAGES_XML_DESCRIPTION="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension type="component" version="0.19.8" method="upgrade"> | ||
<identifier>com:pages</identifier> | ||
<name>com_pages</name> | ||
<author>Joomlatools</author> | ||
<creationDate>March 2021</creationDate> | ||
<copyright>Copyright (C) 2018 Timble CVBA (http://www.timble.net)</copyright> | ||
<license>GNU GPLv3 - http://www.gnu.org/licenses/gpl.html</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>www.joomlatools.com</authorUrl> | ||
<version>0.19.8</version> | ||
<description>COM_PAGES_XML_DESCRIPTION</description> | ||
|
||
<files folder="site/components/com_pages"> | ||
<filename>pages.php</filename> | ||
<filename>config.php</filename> | ||
|
||
<folder>class</folder> | ||
<folder>controller</folder> | ||
<folder>data</folder> | ||
<folder>database</folder> | ||
<folder>dispatcher</folder> | ||
<folder>event</folder> | ||
<folder>http</folder> | ||
<folder>model</folder> | ||
<folder>object</folder> | ||
<folder>page</folder> | ||
<folder>resources</folder> | ||
<folder>template</folder> | ||
<folder>view</folder> | ||
</files> | ||
|
||
<media folder="media"> | ||
<folder>com_pages</folder> | ||
</media> | ||
|
||
<administration> | ||
<files folder="administrator/components/com_pages"> | ||
<filename>version.php</filename> | ||
|
||
<folder>language</folder> | ||
</files> | ||
</administration> | ||
</extension> |
22 changes: 22 additions & 0 deletions
22
Sites/pages/administrator/components/com_pages/version.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* Joomlatools Pages | ||
* | ||
* @copyright Copyright (C) 2018 Timble CVBA. (http://www.timble.net) | ||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | ||
* @link https://github.com/joomlatools/joomlatools-pages for the canonical source repository | ||
*/ | ||
class ComPagesVersion extends KObject | ||
{ | ||
const VERSION = '0.19.8'; | ||
|
||
public function getVersion() | ||
{ | ||
return self::VERSION; | ||
} | ||
|
||
public function __toString() | ||
{ | ||
return $this->getVersion(); | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
Sites/pages/components/com_pages/class/locator/extension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
/** | ||
* Joomlatools Pages | ||
* | ||
* @copyright Copyright (C) 2018 Johan Janssens and Timble CVBA. (http://www.timble.net) | ||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | ||
* @link https://github.com/joomlatools/joomlatools-pages for the canonical source repository | ||
*/ | ||
|
||
class ComPagesClassLocatorExtension extends KClassLocatorAbstract | ||
{ | ||
protected static $_name = 'ext'; | ||
|
||
public function locate($classname, $basepath = null) | ||
{ | ||
if (substr($classname, 0, 3) === 'Ext') | ||
{ | ||
$result = false; | ||
|
||
$word = strtolower(preg_replace('/(?<=\\w)([A-Z])/', ' \\1', $classname)); | ||
$parts = explode(' ', $word); | ||
|
||
array_shift($parts); | ||
$package = array_shift($parts); | ||
$namespace = ucfirst($package); | ||
|
||
if(count($parts)) { | ||
$file = array_pop($parts); | ||
} else { | ||
$file = $package; | ||
} | ||
|
||
$path = ''; | ||
if (!empty($parts)) { | ||
$path = implode('/', $parts) . '/'; | ||
} | ||
|
||
$paths = []; | ||
|
||
//Namespace paths | ||
if($basepath = $this->getNamespace($namespace)) | ||
{ | ||
$paths[] = $basepath.'/'.$path . $file.'.php'; | ||
$paths[] = $basepath.'/'.$path . $file.'/'.$file.'.php'; | ||
} | ||
|
||
///Fallback paths (unused) | ||
if($basepath = $this->getNamespace('\\')) | ||
{ | ||
$paths[] = $basepath.'/'.strtolower($namespace) .'/'.$path . $file.'.php'; | ||
$paths[] = $basepath.'/'.strtolower($namespace) .'/'.$path . $file.'/'.$file.'.php'; | ||
} | ||
|
||
foreach($paths as $path) | ||
{ | ||
if(is_file($path)) | ||
{ | ||
$result = $path; | ||
break; | ||
} | ||
} | ||
|
||
return $result; | ||
} | ||
|
||
return false; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<?php | ||
/** | ||
* Joomlatools Pages | ||
* | ||
* @copyright Copyright (C) 2018 Timble CVBA. (http://www.timble.net) | ||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | ||
* @link https://github.com/joomlatools/joomlatools-pages for the canonical source repository | ||
*/ | ||
|
||
class ComPagesConfig extends KObject implements KObjectSingleton | ||
{ | ||
protected $_site_path; | ||
|
||
public function __construct(KObjectConfig $config) | ||
{ | ||
parent::__construct($config); | ||
|
||
$this->_site_path = $config->site_path; | ||
|
||
//Load the site specific options | ||
$this->_loadOptions(); | ||
} | ||
|
||
protected function _initialize(KObjectConfig $config) | ||
{ | ||
$config->append(array( | ||
'site_path' => Koowa::getInstance()->getRootPath().'/joomlatools-pages' | ||
))->append(array( | ||
'page_cache' => true, | ||
'page_cache_path' => $config->site_path.'/cache/pages', | ||
'page_cache_validation' => true, | ||
|
||
'data_namespaces' => array(), | ||
'data_cache' => true, | ||
'data_cache_path' => $config->site_path ? $config->site_path.'/cache/data' : false, | ||
'data_cache_validation' => true, | ||
|
||
'template_cache' => true, | ||
'template_cache_path' => $config->site_path ? $config->site_path.'/cache/templates' : false, | ||
'template_cache_validation' => true, | ||
|
||
'http_cache' => false, | ||
'http_cache_path' => $config->site_path ? $config->site_path.'/cache/responses': false, | ||
'http_cache_time' => false, | ||
'http_cache_time_browser' => null, | ||
'http_cache_validation' => true, | ||
'http_cache_control' => array(), | ||
'http_cache_control_private' => array('private', 'no-cache'), | ||
|
||
'http_static_cache' => getenv('PAGES_STATIC_ROOT') ? true : false, | ||
'http_static_cache_path' => getenv('PAGES_STATIC_ROOT') ? getenv('PAGES_STATIC_ROOT') : false, | ||
|
||
'http_resource_cache' => JFactory::getConfig()->get('caching'), | ||
'http_resource_cache_path' => $config->site_path ? $config->site_path.'/cache/resources' : false, | ||
'http_resource_cache_debug' => (JDEBUG ? true : false), | ||
|
||
'collections' => array(), | ||
'redirects' => array(), | ||
'page' => array(), | ||
'sites' => array('[*]' => JPATH_ROOT.'/joomlatools-pages'), | ||
'headers' => array(), | ||
|
||
'composer_path' => $config->site_path.'/vendor', | ||
)); | ||
} | ||
|
||
public function getSitePath($path = null) | ||
{ | ||
//If the site path is empty do not try to return a path | ||
if($this->_site_path && $path) { | ||
$result = $this->_site_path.'/'.$path; | ||
} else { | ||
$result = $this->_site_path; | ||
} | ||
|
||
return $result; | ||
} | ||
|
||
public function get($option, $default = null) | ||
{ | ||
return $this->getConfig()->get($option, $default); | ||
} | ||
|
||
public function getOptions() | ||
{ | ||
return KObjectConfig::unbox($this->getConfig()); | ||
} | ||
|
||
protected function _loadOptions() | ||
{ | ||
$options = array(); | ||
|
||
//Load site config | ||
if($path = $this->getSitePath()) | ||
{ | ||
//Get the defaults | ||
$options = KObjectConfig::unbox($this->getConfig()); | ||
|
||
//Load default config options | ||
if(file_exists(JPATH_CONFIGURATION.'/configuration-pages.php')) | ||
{ | ||
$config = (array) include JPATH_CONFIGURATION.'/configuration-pages.php'; | ||
$options = array_replace_recursive($options, $config); | ||
} | ||
|
||
//Register the composer class locator | ||
if(isset($options['composer_path']) && file_exists($options['composer_path'])) | ||
{ | ||
$this->getObject('manager')->getClassLoader()->registerLocator( | ||
new KClassLocatorComposer(array( | ||
'vendor_path' => $options['composer_path'] | ||
) | ||
)); | ||
} | ||
|
||
//Load site config options | ||
if(file_exists($path.'/config.php')) | ||
{ | ||
$config = $this->getObject('object.config.factory')->fromFile($path.'/config.php', false); | ||
$options = array_replace_recursive($options, $config); | ||
} | ||
|
||
$this->getConfig()->merge($options); | ||
} | ||
|
||
return $options; | ||
} | ||
} |
Oops, something went wrong.