Skip to content

Commit

Permalink
Insure interface describes the use of the magic __get and __set methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
trq committed Jun 3, 2012
1 parent b3227e9 commit be4ec8b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/Proem/Api/Service/Manager/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
*/
interface Template
{
/**
* Magic method to proxy through to set()
*
* @param string $index The index the asset will be referenced by.
* @param Proem\Api\Service\Asset\Template $asset
* @return Proem\Api\Service\Manager\Template
*/
public function __set($index, Asset $asset);

/**
* Store an Asset container by named index.
*
Expand All @@ -54,6 +63,14 @@ public function set($index, Asset $asset);
*/
public function getContainer($index);

/**
* Magic method to proxy through to get().
*
* @param string $index The index the asset is referenced by
* @return object The object provided by the asset container
*/
public function __get($index);

/**
* Retrieve an actual instantiated ssset object from within it's container.
*
Expand Down

0 comments on commit be4ec8b

Please sign in to comment.