Skip to content

Commit

Permalink
Added more comments to class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
hollax committed May 6, 2016
1 parent 0c04916 commit 24a792d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions class-array-config-writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ public function write( $index = null, $replacement = null , $skip_if_exists = F
$mark = "{$prefix}" ;
// we can update multi dementional
$indece = is_array($index)? $index : array( $index ) ;

$comment_str = '' ;

foreach ( $indece as $index => $i)
{
$regex .= '\[\s*(\'|\")(' . $i . ')*(\'|\")\s*\]' ;
Expand Down Expand Up @@ -177,7 +178,7 @@ public function write( $index = null, $replacement = null , $skip_if_exists = F
if(is_array($comments) && count($comments) > 0 )
{
// add the comment
$comment_str = '/**' ;
$comment_str .= '/**' ;
$comment_str .= "\n" ;
foreach ($comments as $line)
{
Expand Down Expand Up @@ -205,6 +206,8 @@ public function write( $index = null, $replacement = null , $skip_if_exists = F
* Update the variable name of the array config
*
* @param string $name
*
* @return Array_Config_Writer for method chaining
*/
public function setFilename($name = null)
{
Expand All @@ -217,6 +220,8 @@ public function setFilename($name = null)
* // actually we expect someting like '\$config' but user migt just provide 'config'
*
* @param string $name
*
* @return Array_Config_Writer
*/
public function setVariableName($name = null)
{
Expand All @@ -232,6 +237,8 @@ public function setVariableName($name = null)
}

$this->_variable = $name;

return $this;
}

/**
Expand Down

0 comments on commit 24a792d

Please sign in to comment.