[Solar-svn] Revision 2651
pmjones at solarphp.com
pmjones at solarphp.com
Sun Jul 29 11:39:48 CDT 2007
Branch: Solar_Uri: [BRK] Renamed method fetch() to get(), to be more consistent with naming conventions (because we are "getting" properties, not "fetching" from storage)
Modified: branches/orm/Solar/App/Bookmarks/Layout/_local.php
===================================================================
--- branches/orm/Solar/App/Bookmarks/Layout/_local.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/Solar/App/Bookmarks/Layout/_local.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -38,7 +38,7 @@
<p><?php
$uri = Solar::factory('Solar_Uri_Action');
$uri->set('bookmarks/quick');
- $href = $uri->fetch(true);
+ $href = $uri->get(true);
$js = "javascript:location.href='$href?uri='+encodeURIComponent(location.href)+'&subj='+encodeURIComponent(document.title)";
echo $this->getText('DRAG_THIS') . ': ';
echo $this->anchor($js, 'ACTION_QUICK');
Modified: branches/orm/Solar/App/Bookmarks/View/browse.php
===================================================================
--- branches/orm/Solar/App/Bookmarks/View/browse.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/Solar/App/Bookmarks/View/browse.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -35,7 +35,7 @@
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => implode('/', $uri->path),
- 'href' => $uri->fetch(true),
+ 'href' => $uri->get(true),
);
?>
Modified: branches/orm/Solar/Http/Request/Adapter.php
===================================================================
--- branches/orm/Solar/Http/Request/Adapter.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/Solar/Http/Request/Adapter.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -980,7 +980,7 @@
}
// done!
- return array($uri->fetch(true), $headers, $content);
+ return array($uri->get(true), $headers, $content);
}
/**
Modified: branches/orm/Solar/Uri.php
===================================================================
--- branches/orm/Solar/Uri.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/Solar/Uri.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -80,7 +80,7 @@
* $uri->path[] = 'another';
*
* // and fetch it to a string.
- * $new_uri = $uri->fetch();
+ * $new_uri = $uri->get();
*
* // the $new_uri string is as follows; notice how the format
* // is always applied to the last path-element.
@@ -88,7 +88,7 @@
*
* // wait, there's no scheme or host!
* // we need to fetch the "full" URI.
- * $full_uri = $uri->fetch(true);
+ * $full_uri = $uri->get(true);
*
* // the $full_uri string is:
* // https://example.com/something/else/entirely/another.php?baz=zab&zim=gir#anchor
@@ -421,7 +421,7 @@
* @return string An action URI string.
*
*/
- public function fetch($full = false)
+ public function get($full = false)
{
// the uri string
$uri = '';
@@ -472,7 +472,7 @@
{
$uri = clone($this);
$uri->set($spec);
- return $uri->fetch($full);
+ return $uri->get($full);
}
Modified: branches/orm/Solar/View/Helper/Base.php
===================================================================
--- branches/orm/Solar/View/Helper/Base.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/Solar/View/Helper/Base.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -45,7 +45,7 @@
$uri->setQuery(null);
// use that as the base
- $href = $uri->fetch(true);
+ $href = $uri->get(true);
} else {
$href = $spec;
Modified: branches/orm/Solar/View/Helper/TypekeyLink.php
===================================================================
--- branches/orm/Solar/View/Helper/TypekeyLink.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/Solar/View/Helper/TypekeyLink.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -78,7 +78,7 @@
}
// save the current URI as the return location after typekey.
- $return = $uri->fetch(true);
+ $return = $uri->get(true);
// now reset the URI to point to the typekey service
$uri->set($this->_config['href']);
@@ -97,6 +97,6 @@
$uri->query['_return'] = $return;
// done!
- return $this->_view->anchor($uri->fetch(true), $text);
+ return $this->_view->anchor($uri->get(true), $text);
}
}
Modified: branches/orm/tests/Solar/Uri/ActionTest.php
===================================================================
--- branches/orm/tests/Solar/Uri/ActionTest.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/tests/Solar/Uri/ActionTest.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -11,10 +11,10 @@
$this->_uri->set('controller/action/id/?page=1');
// partial fetch
- $this->assertSame($this->_uri->fetch(), '/controller/action/id?page=1');
+ $this->assertSame($this->_uri->get(), '/controller/action/id?page=1');
// full fetch
- $this->assertSame($this->_uri->fetch(true), 'http://example.com/controller/action/id?page=1');
+ $this->assertSame($this->_uri->get(true), 'http://example.com/controller/action/id?page=1');
}
public function testQuick()
Modified: branches/orm/tests/Solar/Uri/PublicTest.php
===================================================================
--- branches/orm/tests/Solar/Uri/PublicTest.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/tests/Solar/Uri/PublicTest.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -11,10 +11,10 @@
$this->_uri->set('Solar/styles/default.css');
// partial fetch
- $this->assertSame($this->_uri->fetch(), '/Solar/styles/default.css');
+ $this->assertSame($this->_uri->get(), '/Solar/styles/default.css');
// full fetch
- $this->assertSame($this->_uri->fetch(true), 'http://example.com/Solar/styles/default.css');
+ $this->assertSame($this->_uri->get(true), 'http://example.com/Solar/styles/default.css');
}
Modified: branches/orm/tests/Solar/UriTest.php
===================================================================
--- branches/orm/tests/Solar/UriTest.php 2007-07-29 16:38:04 UTC (rev 2650)
+++ branches/orm/tests/Solar/UriTest.php 2007-07-29 16:39:48 UTC (rev 2651)
@@ -89,7 +89,7 @@
// npw export in full, then re-import and check again.
// do this to make sure there are no translation errors.
- $spec = $this->_uri->fetch(true);
+ $spec = $this->_uri->get(true);
$this->_uri->set($spec);
$this->assertSame($this->_uri->scheme, $scheme);
$this->assertSame($this->_uri->host, $host);
@@ -133,10 +133,10 @@
$this->_uri->set($expect_full);
// full fetch
- $this->assertSame($this->_uri->fetch(true), $expect_full);
+ $this->assertSame($this->_uri->get(true), $expect_full);
// partial fetch
- $this->assertSame($this->_uri->fetch(false), $expect_part);
+ $this->assertSame($this->_uri->get(false), $expect_part);
}
public function testQuick()
More information about the Solar-svn
mailing list