Permalink
Browse files

read убран из публичного интерфейса т.к. чтение файла обязательно . о…

…но перенесено в конструктор
  • Loading branch information...
1 parent a6a73cb commit cfdf0f296302749c9f7b0a5699b6d68e15a5ca9c @Gemorroj committed Nov 11, 2012
Showing with 3 additions and 18 deletions.
  1. +1 −12 MP3/Id3.php
  2. +1 −3 README.md
  3. +1 −3 readme.txt
View
@@ -32,6 +32,7 @@ public function __construct($file)
{
$this->file = $file;
$this->best = new MP3_Id3_Best();
+ $this->best->read($this->file);
}
@@ -57,18 +58,6 @@ public function getMeta()
* @throws MP3_Id3_Exception
* @return MP3_Id3
*/
- public function read()
- {
- $this->best->read($this->file);
-
- return $this;
- }
-
-
- /**
- * @throws MP3_Id3_Exception
- * @return MP3_Id3
- */
public function write()
{
$this->best->write($this->file);
View
@@ -4,11 +4,9 @@
```php
<?php
set_include_path(__DIR__);
-
require_once 'MP3/Id3.php';
-$id3 = new MP3_Id3(__DIR__ . '/file.mp3');
-$id3->read();
+$id3 = new MP3_Id3('./file.mp3');
$tags = $id3->getTags();
echo '<pre>';
View
@@ -2,11 +2,9 @@
Пример:
set_include_path(__DIR__);
-
require_once 'MP3/Id3.php';
-$id3 = new MP3_Id3(__DIR__ . '/file.mp3');
-$id3->read();
+$id3 = new MP3_Id3('./file.mp3');
$tags = $id3->getTags();
echo '<pre>';

0 comments on commit cfdf0f2

Please sign in to comment.