This is a system of portable, extensible link management.
The system is based around the "link specification", which is a string.
Link specifications should be stored in a TEXT field.
These specs relate to classes which extend LinkSpec.
The class name needs to start with "LinkSpec" too.
/sprout/tests/lnkTest.php Highlighted file source
Line 14: use Sprout\Helpers\Lnk;
Line 18: class lnkTest extends PHPUnit_Framework_TestCase
Line 30: $this->assertTrue(Lnk::url($spec) === 'http://www.chaoticrage.com');
Line 31: $this->assertTrue(Lnk::atag($spec) === '<a href="http://www.chaoticrage.com" target="_blank">');
Line 85: $this->assertEquals($expected, Lnk::atag($spec, $attrs));
/sprout/tests/lnkTest.php Highlighted file source
Line 14: use Sprout\Helpers\Lnk;
Line 18: class lnkTest extends PHPUnit_Framework_TestCase
Line 30: $this->assertTrue(Lnk::url($spec) === 'http://www.chaoticrage.com');
Line 31: $this->assertTrue(Lnk::atag($spec) === '<a href="http://www.chaoticrage.com" target="_blank">');
Line 85: $this->assertEquals($expected, Lnk::atag($spec, $attrs));
A total of 49 lines in 22 files were found