admin/jqadm/src/Admin/JQAdm/Base.php
protected function addDecorators( \Aimeos\Admin\JQAdm\Iface $client, array $decorators, $classprefix )
	{
		foreach( $decorators as $name )
		{
			if( ctype_alnum( $name ) === false )
			{
				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
			}

			$classname = $classprefix . $name;

			if( class_exists( $classname ) === false ) {
				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
			}

			$client = new $classname( $client, $this->context );

			\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\Iface', $client );
		}

		return $client;
	}
protected function addDecorators( \Aimeos\Admin\JQAdm\Iface $client, array $decorators, $classprefix )
	{
		foreach( $decorators as $name )
		{
			if( ctype_alnum( $name ) === false )
			{
				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
			}

			$classname = $classprefix . $name;

			if( class_exists( $classname ) === false ) {
				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
			}

			$client = new $classname( $client, $this->context );

			\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\Iface', $client );
		}

		return $client;
	}
protected function addDecorators ( \ Aimeos \ Admin \ JQAdm \ Iface $ client , array $ decorators , $ classprefix ) { foreach ( $ decorators as $ name ) { if ( ctype_alnum ( $ name ) === false ) { $ classname = is_string ( $ name ) ? $ classprefix . $ name : '<not a string>' ; throw new \ Aimeos \ Admin \ JQAdm \ Exception ( sprintf ( 'Invalid class name "%1$s"' , $ classname ) ) ; } $ classname = $ classprefix . $ name ; if ( class_exists ( $ classname ) === false ) { throw new \ Aimeos \ Admin \ JQAdm \ Exception ( sprintf ( 'Class "%1$s" not found' , $ classname ) ) ; } $ client = new $ classname ( $ client , $ this -> context ) ; \ Aimeos \ MW \ Common \ Base :: checkClass ( '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\Iface' , $ client ) ; } return $ client ; }
Adds the decorators to the client object

@param \Aimeos\Admin\JQAdm\Iface $client Admin object
@param array $decorators List of decorator name that should be wrapped around the client
@param string $classprefix Decorator class prefix, e.g. "\Aimeos\Admin\JQAdm\Catalog\Decorator\"
@return \Aimeos\Admin\JQAdm\Iface Admin object
Adds the decorators to the client object