Development

Changeset 19666

You must first sign up to be able to contribute.

Changeset 19666

Show
Ignore:
Timestamp:
06/29/09 11:00:00 (4 years ago)
Author:
gimler
Message:

csDoctrineActAsAttachablePlugin[1.3]: add phpdocs and svn id keywords

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/csDoctrineActAsAttachablePlugin/branches/1.3/lib/csDoctrineActAsAttachableRouting.class.php

    • Property svn:keywords set to Id
    r19642 r19666  
    1010 
    1111/** 
     12 * routing class for csDoctrineActAsAttachable plugin 
    1213 * 
    1314 * @package    symfony 
    1415 * @subpackage plugin 
    1516 * @author     Gordon Franke <gfranke@savedcite.com> 
    16  * @version    SVN: $Id: sfGuardExtraRouting.class.php 18403 2009-05-18 15:05:27Z gimler
     17 * @version    SVN: $Id
    1718 */ 
    1819class csDoctrineActAsAttachableRouting 
  • plugins/csDoctrineActAsAttachablePlugin/branches/1.3/lib/template/Attachable.php

    • Property svn:keywords set to Id
    r19642 r19666  
    11<?php 
     2 
     3/** 
     4 * template for attachable behavior 
     5 * 
     6 * @package    symfony 
     7 * @subpackage plugin 
     8 * @author     Brent Shaffer 
     9 * @version    SVN: $Id$ 
     10 */ 
    211class Doctrine_Template_Attachable extends Doctrine_Template 
    312{ 
    413  protected $_options = array('types' => array(), 
    514                              'attachableModels' => array()); 
    6    
     15 
    716  /** 
    817   * Constructor for Attachable Template 
    918   * 
    10    * @param  array $options 
     19   * @param array $options template options 
     20   * 
    1121   * @return void 
    12    * @author Brent Shaffer 
    1322   */ 
    1423  public function __construct(array $options = array()) 
     
    1726  } 
    1827 
     28  /** 
     29   * @see Doctrine_Template 
     30   */ 
    1931  public function setTableDefinition() 
    2032  { 
     
    2335 
    2436  /** 
     37   * get the doctrine query that is used for fetching attachments 
    2538   * 
    2639   * @return Doctrine_Query 
     
    3649  } 
    3750 
     51  /** 
     52   * get all attachments 
     53   * 
     54   * @return Doctrine_Collection|false 
     55   */ 
    3856  public function getAttachments() 
    3957  { 
     
    4361  } 
    4462 
     63  /** 
     64   * add attachments 
     65   * 
     66   * @param array $attachments attachments to add 
     67   * 
     68   * @return void 
     69   * 
     70   * @see addAttachment 
     71   */ 
    4572  public function setAttachments($attachments) 
    4673  { 
     
    5178  } 
    5279 
     80  /** 
     81   * check if the record has a attachment 
     82   * 
     83   * @return boolean 
     84   */ 
    5385  public function hasAttachments() 
    5486  { 
     
    5688  } 
    5789 
     90  /** 
     91   * check if the record has a attachment of specific type 
     92   * 
     93   * @return boolean 
     94   */ 
    5895  public function hasAttachmentsOfType($type) 
    5996  { 
     
    6198  } 
    6299 
    63   public function addAttachment($attachment) 
     100  /** 
     101   * add attachment to record and save attachment into db 
     102   * 
     103   * @param Attachment $attachment the attachment record 
     104   * 
     105   * @return void 
     106   */ 
     107  public function addAttachment(Attachment $attachment) 
    64108  { 
    65109    $object = $this->getInvoker(); 
     
    73117    $attachment->save();   
    74118  } 
    75    
     119 
     120  /** 
     121   * get record attachments of specific type 
     122   * 
     123   * @param string $type the attachemnt type to fetch 
     124   * 
     125   * @return Doctrine_Collection 
     126   */ 
    76127  public function getAttachmentsByType($type) 
    77128  { 
     
    90141  } 
    91142 
     143  /** 
     144   * get all supported attachment types 
     145   * 
     146   * @return array 
     147   * 
     148   * @see getAttachableConfig() 
     149   */ 
    92150  public function getSupportedAttachmentTypes() 
    93151  { 
     
    95153  } 
    96154 
     155  /** 
     156   * get complete config or specific value 
     157   * 
     158   * @param string $index 
     159   * 
     160   * @return mixed 
     161   */ 
    97162  public function getAttachableConfig($index = null) 
    98163  { 
     
    104169  } 
    105170 
     171  /** 
     172   * get all attachments of type video 
     173   * 
     174   * @return Doctrine_Collection 
     175   * 
     176   * @see getAttachmentsByType() 
     177   */ 
    106178  public function getVideoAttachments() 
    107179  { 
     
    109181  } 
    110182 
     183  /** 
     184   * get all attachments of type image 
     185   * 
     186   * @return Doctrine_Collection 
     187   * 
     188   * @see getAttachmentsByType() 
     189   */ 
    111190  public function getImageAttachments() 
    112191  { 
     
    114193  } 
    115194 
     195  /** 
     196   * get all attachments of type document 
     197   * 
     198   * @return Doctrine_Collection 
     199   * 
     200   * @see getAttachmentsByType() 
     201   */ 
    116202  public function getDocumentAttachments() 
    117203  { 
     
    119205  } 
    120206 
     207  /** 
     208   * get all attachments of type other 
     209   * 
     210   * @return Doctrine_Collection 
     211   * 
     212   * @see getAttachmentsByType() 
     213   */ 
    121214  public function getOtherAttachments() 
    122215  { 
     
    124217  } 
    125218 
     219  /** 
     220   * get all attachments of type model 
     221   * 
     222   * @return Doctrine_Collection 
     223   * 
     224   * @see getAttachmentsByType() 
     225   */ 
    126226  public function getModelAttachments() 
    127227  {