Skip to content

Commit

Permalink
fix: strict notifications [...]
Browse files Browse the repository at this point in the history
since legacy joomla seems not going away soon, update it so strict warnings are not issued by php 5
  • Loading branch information
kulbakin committed Dec 28, 2013
1 parent 60af54a commit cc4c11a
Show file tree
Hide file tree
Showing 100 changed files with 14,350 additions and 15,631 deletions.
964 changes: 490 additions & 474 deletions src/administrator/includes/toolbar.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/libraries/anahita/domain/query/helper.php
@@ -1,5 +1,4 @@
<?php

/**
* Query Helper Class
*
Expand Down Expand Up @@ -182,7 +181,8 @@ static public function _parseOneToMany($query, $relationship, $attribute = null,
if ( ! $child_belongs_to_property->getParent()) {
throw new AnDomainQueryException('Query Building Failed. Unkown Parent');
} elseif ($child_belongs_to_property->isPolymorphic()) {
$columns = array(array_shift(array_keys($columns)) => array_shift(array_values($columns)));
list($k) = array_keys($columns);
$columns = array($k => $columns[$k]);
}

$condition = array();
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/anahita/domain/query/query.php
Expand Up @@ -474,8 +474,8 @@ public function getKey()
$key = false;

if (count($this->where) == 1) {
$where = array_pop(array_values($this->where));
if ( isset($where['property']) ) {
list($where) = array_values($this->where);
if (isset($where['property'])) {
$property = $where['property'];
$keys = $this->getRepository()->getDescription()->getIdentifyingProperties();
if (isset($keys[$property]) && isset($where['constraint']) && $where['constraint'] == '=' && !is_array($where['value'])) {
Expand Down
64 changes: 23 additions & 41 deletions src/libraries/anahita/service/locator/repository.php
@@ -1,19 +1,4 @@
<?php

/**
* LICENSE: ##LICENSE##
*
* @category Anahita
* @package Anahita_Service
* @subpackage Locator
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @copyright 2008 - 2010 rmdStudio Inc./Peerglobe Technology Inc
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
* @version SVN: $Id$
* @link http://www.anahitapolis.com
*/

/**
* Repositroy locator is KService locator to return repository objects of any entities.
*
Expand All @@ -26,77 +11,74 @@
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
* @link http://www.anahitapolis.com
* @copyright 2008 - 2010 rmdStudio Inc./Peerglobe Technology Inc
*/
class AnServiceLocatorRepository extends KServiceLocatorAbstract implements KServiceInstantiatable
{
/**
* Return
*
* @param KConfigInterface $config An optional KConfig object with configuration options
* @param KServiceInterface $container A KServiceInterface object
*
*
* @param KConfigInterface $config An optional KConfig object with configuration options
* @param KServiceInterface $container A KServiceInterface object
* @return KServiceInstantiatable
*/
public static function getInstance(KConfigInterface $config, KServiceInterface $container)
{
if (!$container->has($config->service_identifier))
{
if ( ! $container->has($config->service_identifier)) {
$identifier = self::_identifier($config->service_identifier);
$instance = AnDomain::getRepository($identifier, $config->toArray());
$container->set($config->service_identifier, $instance);
}

return $container->get($config->service_identifier);
}

/**
* The type
*
*
* @var string
*/
protected $_type = 'repos';

/**
* Get the classname based on an identifier
*
* @param mixed An identifier object - koowa:[path].name
*
* @param mixed An identifier object - koowa:[path].name
* @return string|false Return object on success, returns FALSE on failure
*/
public function findClass(KServiceIdentifier $identifier)
{
{
return __CLASS__;
}

}
/**
* Get the path based on an identifier
*
* @param object An identifier object - koowa:[path].name
* @return string Returns the path
* @param object An identifier object - koowa:[path].name
* @return string Returns the path
*/
public function findPath(KServiceIdentifier $identifier)
{
return self::_identifier($identifier)->filepath;
}

}
/**
* Converts a repos locator identifier repos:[//application/]<Component>.<Name> to a
* component identifier
*
* @param KServiceIdentifier $identifier
*
* @param KServiceIdentifier $identifier
* @return KServiceIdentifier
*/
protected function _identifier(KServiceIdentifier $identifier)
protected static function _identifier(KServiceIdentifier $identifier)
{
$identifier = clone $identifier;

if ( !$identifier->name ) {
if ( ! $identifier->name ) {
$identifier->name = KInflector::singularize($identifier->package);
}

$identifier->type = 'com';
$identifier->path = array('domain','entity');
return $identifier;
$identifier->path = array('domain', 'entity');
return $identifier;
}
}
}
2 changes: 1 addition & 1 deletion src/site/components/com_application/application.php
Expand Up @@ -194,7 +194,7 @@ public function setTemplate( $template )
*
* @return JMenu
*/
public function &getMenu()
public static function &getMenu()
{
$options = array();
$menu =& parent::getMenu('site', $options);
Expand Down

0 comments on commit cc4c11a

Please sign in to comment.