$domid = $options['container'];
}
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'Embed'), $options);
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'Embed'), $options);
return '<script type="text/javascript" src="' . $imple->getUrl() . '"></script><div id="' . $domid . '"></div>';
}
if ($option_edit) {
// @TODO: passing thumbstyle here doesn't look right to me.
$geometry = $image->getDimensions($thumbstyle);
- $GLOBALS['injector']->createInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'EditCaption'), array(
- 'domid' => $image->id . 'caption',
- 'id' => $image->id,
- 'width' => $geometry['width']
- ));
+ $GLOBALS['injector']->createInstance('Horde_Core_Factory_Imple')->create(
+ array('ansel', 'EditCaption'),
+ array('domid' => $image->id . 'caption',
+ 'id' => $image->id,
+ 'width' => $geometry['width']));
}
include ANSEL_BASE . '/templates/tile/image.inc';
Horde::addScriptFile('popup.js', 'horde');
/* Attach the slug check action to the form */
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'GallerySlugCheck'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'GallerySlugCheck'), array(
'bindTo' => 'gallery_slug',
'slug' => $this->_properties['slug']
));
/* In line caption editing */
if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$geometry = $this->resource->getDimensions();
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'EditCaption'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'EditCaption'), array(
'width' => $geometry['width'],
'domid' => "Caption",
'id' => $this->resource->id
/* Attach the ajax action */
Horde::startBuffer();
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'ToggleGalleryActions'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'ToggleGalleryActions'), array(
'bindTo' => 'gallery-actions'
));
$html .= Horde::endBuffer();
$rtext = _("Relocate this image");
$dtext = _("Delete geotag");
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'ImageSaveGeotag'));
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'ImageSaveGeotag'));
$impleUrl = $imple->getUrl();
$permsEdit = $this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
// Attach the ajax edit actions
Horde::startBuffer();
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'EditFaces'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'EditFaces'), array(
'domid' => 'edit_faces',
'image_id' => $this->_view->resource->id,
'selfUrl' => $this->_params['selfUrl']
}
Horde::startBuffer();
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'ToggleOtherGalleries'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'ToggleOtherGalleries'), array(
'bindTo' => 'othergalleries'
));
if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
Horde::startBuffer();
/* Attach the Ajax action */
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'TagActions'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'TagActions'), array(
'bindTo' => array('add' => 'tagbutton'),
'gallery' => $this->_view->gallery->id,
'image' => $image_id
'gallery' => $gallery->id));
$image_tag = '<img src="' . Ansel::getImageUrl($image_id, 'thumb', true) . '" alt="[thumbnail]" />';
/* Url for geotag ajax helper */
-$gt = $injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'ImageSaveGeotag'));
+$gt = $injector->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'ImageSaveGeotag'));
$gtUrl = $gt->getUrl();
$loadingImg = Horde::img('loading.gif', _("Loading..."));
</script>
EOT;
/* Autocompleter for locations we already have in our DB */
-$injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('ansel', 'LocationAutoCompleter'), array(
+$injector->getInstance('Horde_Core_Factory_Imple')->create(array('ansel', 'LocationAutoCompleter'), array(
'map' => 'mapEdit',
'resultsId' => 'locationInput_results',
'triggerId' => 'locationInput'
+++ /dev/null
-<?php
-/**
- * @category Horde
- * @package Core
- */
-class Horde_Core_Binder_AjaxFactory implements Horde_Injector_Binder
-{
- public function create(Horde_Injector $injector)
- {
- return new Horde_Core_Factory_Ajax($injector);
- }
-
- public function equals(Horde_Injector_Binder $binder)
- {
- return false;
- }
-}
+++ /dev/null
-<?php
-/**
- * @category Horde
- * @package Core
- */
-class Horde_Core_Binder_ImpleFactory implements Horde_Injector_Binder
-{
- public function create(Horde_Injector $injector)
- {
- return new Horde_Core_Factory_Imple($injector);
- }
-
- public function equals(Horde_Injector_Binder $binder)
- {
- return false;
- }
-}
* @return Horde_Core_Ajax_Application The requested instance.
* @throws Horde_Exception
*/
- public function getAjax($app, $vars, $action = null)
+ public function create($app, $vars, $action = null)
{
$class = $app . '_Ajax_Application';
* @return Horde_Core_Ajax_Imple The newly created instance.
* @throws Horde_Exception
*/
- public function getImple($driver, array $params = array(),
+ public function create($driver, array $params = array(),
$noattach = false)
{
if (is_array($driver)) {
/* Define binders. */
$binders = array(
- 'Horde_Ajax_Factory' => 'Horde_Core_Binder_AjaxFactory',
- 'Horde_Ajax_Imple_Factory' => 'Horde_Core_Binder_ImpleFactory',
'Horde_Alarm' => 'Horde_Core_Binder_Alarm',
'Horde_Auth_Factory' => 'Horde_Core_Binder_AuthFactory',
// 'Horde_Browser' - initialized below
'Horde_Token' => 'Horde_Core_Binder_Token',
'Horde_Vfs' => 'Horde_Core_Binder_Vfs',
'Net_DNS_Resolver' => 'Horde_Core_Binder_Dns',
+ 'Horde_Rpc_ActiveSync' => 'Horde_Core_Binder_ActiveSync'
);
/* Define factories. */
</dir> <!-- /lib/Horde/Core/Autoloader/Callback -->
</dir> <!-- /lib/Horde/Core/Autoloader -->
<dir name="Binder">
- <file name="AjaxFactory.php" role="php" />
<file name="Alarm.php" role="php" />
<file name="AuthFactory.php" role="php" />
<file name="AuthSignup.php" role="php" />
<file name="History.php" role="php" />
<file name="HttpClient.php" role="php" />
<file name="Identity.php" role="php" />
- <file name="ImpleFactory.php" role="php" />
<file name="Ldap.php" role="php" />
<file name="Lock.php" role="php" />
<file name="Logger.php" role="php" />
if ($action != 'logOut') {
/* Handle session timeouts when they come from an AJAX request. */
if ($e->getCode() == Horde_Registry::AUTH_FAILURE) {
- $ajax = $injector->getInstance('Horde_Ajax_Factory')->getAjax($app, Horde_Variables::getDefaultVariables());
+ $ajax = $injector->getInstance('Horde_Core_Factory_Ajax')->create($app, Horde_Variables::getDefaultVariables());
$notification->push(str_replace('&', '&', $registry->getLogoutUrl(array('reason' => Horde_Auth::REASON_SESSION))), 'horde.ajaxtimeout', array('content.raw'));
Horde::sendHTTPResponse(Horde::prepareResponse(null, $ajax->notify), $ajax->responseType());
exit;
// encoding.
ob_start();
-$ajax = $injector->getInstance('Horde_Ajax_Factory')->getAjax($app, Horde_Variables::getDefaultVariables(), $action);
+$ajax = $injector->getInstance('Horde_Core_Factory_Ajax')->create($app, Horde_Variables::getDefaultVariables(), $action);
try {
$result = $ajax->doAction();
} catch (Exception $e) {
$impleargs = array($args['impleApp'], $impleName);
}
-$imple = $injector->getInstance('Horde_Ajax_Imple_Factory')->getImple($impleargs, array(), true);
+$imple = $injector->getInstance('Horde_Core_Factory_Imple')->create($impleargs, array(), true);
$result = $imple->handle($args, $post);
$ct = empty($_SERVER['Content-Type'])
/* Ask for the correct passphrase if this is encrypted
* symmetrically. */
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'PassphraseDialog'), array(
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'PassphraseDialog'), array(
'params' => array(
'symmetricid' => $symmetric_id
),
if (is_null($personal_pass)) {
/* Ask for the private key's passphrase if this is
* encrypted asymmetrically. */
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'PassphraseDialog'), array(
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'PassphraseDialog'), array(
'type' => 'pgpPersonal'
));
$status[] = Horde::link('#', '', '', '', '', '', '', array('id' => $imple->getPassphraseId())) . _("You must enter the passphrase for your PGP private key to view this message.") . '</a>';
/* Make sure we have a passphrase. */
$passphrase = $this->_impsmime->getPassphrase();
if (is_null($passphrase)) {
- $imple = $GLOBALS['registry']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'PassphraseDialog'), array(
+ $imple = $GLOBALS['registry']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'PassphraseDialog'), array(
'type' => 'smimePersonal'
));
$status[] = Horde::link('#', '', '', '', '', '', '', array('id' => $imple->getPassphraseId())) . _("You must enter the passphrase for your S/MIME private key to view this data.") . '</a>';
$t->set('sendkey', Horde::link($ui->selfUrl(array('special' => true))->add('send_pgp_key', 1), _("Send Key to Public Keyserver")));
$t->set('personalkey-public-help', Horde_Help::link('imp', 'pgp-personalkey-public'));
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'PassphraseDialog'), array(
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'PassphraseDialog'), array(
'type' => 'pgpPersonal'
));
$t->set('viewpublic', Horde::link($smime_url->copy()->add('actionID', 'view_personal_public_key'), _("View Personal Public Certificate"), null, 'view_key'));
$t->set('infopublic', Horde::link($smime_url->copy()->add('actionID', 'info_personal_public_key'), _("Information on Personal Public Certificate"), null, 'info_key'));
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'PassphraseDialog'), array(
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'PassphraseDialog'), array(
'type' => 'smimePersonal'
));
{
/* Attach autocompleters to the compose form elements. */
foreach ($fields as $val) {
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'ContactAutoCompleter'), array('triggerId' => $val));
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'ContactAutoCompleter'), array('triggerId' => $val));
}
}
)
);
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple('SpellChecker', $args);
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create('SpellChecker', $args);
}
/**
break;
}
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('imp', 'PassphraseDialog'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('imp', 'PassphraseDialog'), array(
'onload' => true,
'params' => $params,
'type' => $type
$vfb_html = $attendee_view->render($date);
// Add the ContactAutoCompleter
-$injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'ContactAutoCompleter'), array(
+$injector->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'ContactAutoCompleter'), array(
'triggerId' => 'newAttendees'
));
$vars->set('system', is_null($calendar->get('owner')));
$title = $form->getTitle();
-$injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'TagAutoCompleter'), array(
+$injector->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'TagAutoCompleter'), array(
'triggerId' => 'tags'
));
$taskAlarmParams = substr($taskAlarmParams, 0, - 6) . '</div>';
}
-$injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(
+$injector->getInstance('Horde_Core_Factory_Imple')->create(
array('kronolith', 'TagAutoCompleter'),
array(
'box' => 'kronolithEventACBox',
)
);
-$injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(
+$injector->getInstance('Horde_Core_Factory_Imple')->create(
array('kronolith', 'TagAutoCompleter'),
array(
'box' => 'kronolithCalendarinternalACBox',
)
);
-$injector->getInstance('Horde_Ajax_Imple_Factory')->getImple(
+$injector->getInstance('Horde_Core_Factory_Imple')->create(
array('kronolith', 'ContactAutoCompleter'),
array(
'box' => 'kronolithAttendeesACBox',
public static function embedCode($calendar)
{
/* Get the base url */
- $imple = $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'Embed'), array(
+ $imple = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'Embed'), array(
'calendar' => $calendar,
'container' => 'kronolithCal',
'view' => 'month'
<td colspan="4">
<input type="text" name="tags" id="tags" value="<?php echo (!empty($tags) ? htmlspecialchars($tags) : '')?>" size="40" />
<span id="tags_loading_img" style="display:none;"><?php echo Horde::img('loading.gif', _("Loading...")) ?></span>
- <?php $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'tags', 'id' => $event->uid)); ?>
+ <?php $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'tags', 'id' => $event->uid)); ?>
</td>
</tr>
<!-- spacer -->
. Horde::img('delete-small.png', _("Remove Tag"))
. '</a>';
}
-$GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'TagActions'), array(
+$GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'TagActions'), array(
'action' => 'delete',
'resource' => $id,
'tagId' => $tag_id,
<input type="text" name="newtags-input_<?php echo $id?>" id="newtags-input_<?php echo $id?>" size="10" /><input type="button" class="button" value="add" name="newtags-button_<?php echo $id?>" id="newtags-button_<?php echo $id?>" />
<span id="newtags-input_<?php echo $id?>_loading_img" style="display:none;"><?php echo Horde::img('loading.gif', _("Loading...")) ?></span>
<?php
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'TagAutoCompleter'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'TagAutoCompleter'), array(
'id' => $id,
'triggerId' => 'newtags-input_' . $id
));
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('kronolith', 'TagActions'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('kronolith', 'TagActions'), array(
'action' => 'add',
'resource' => $id,
'triggerId' => 'newtags-button',
$body = Horde::callHook('format_description', array($body), 'mnemo', $body);
} catch (Horde_Exception_HookNotSet $e) {}
$html .= $body . '</div>';
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('mnemo', 'EditNote'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('mnemo', 'EditNote'), array(
'domid' => 'noteBody' . $memo['memo_id'],
'id' => $this->_params['note_uid'],
'rows' => substr_count($memo['body'], "\n"),
{
$name = $var->getVarName();
- $GLOBALS['injector']->getInstance('Horde_Ajax_Imple_Factory')->getImple(array('whups', 'ContactAutoCompleter'), array(
+ $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create(array('whups', 'ContactAutoCompleter'), array(
'triggerId' => $name
));